Re: [PERFORM] Subquery flattening causing sequential scan

2011-12-28 Thread Jim Crate
On Dec 27, 2011, at 1:12 PM, Tom Lane wrote: > Jim Crate writes: >> My question is why does it do a seq scan when it flattens this >> subquery into a JOIN? > > Because it thinks there will be 3783 rows out of the msg scan, which if > true would make your desired nestl

[PERFORM] Subquery flattening causing sequential scan

2011-12-27 Thread Jim Crate
Cond: (ema.message_id = msg.id) Total runtime: 273.679 ms Jim Crate -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance