On Wed, Mar 30, 2011 at 7:32 PM, Lawrence Cohan <lco...@web.com> wrote:
> Please see updated attachment that includes the tables involved in the simple 
> query below and all their indexes. We believe that the performance issue is 
> due to the query not using any index but doing seq scans instead and this is 
> very little related to the knowledge from the link you posted below. As you 
> can see we picked a simple query with INNER JOIN between two indexed tables 
> where postgres 8.3 and 9.0 decides to not use existing indexes for whatever 
> reason.


Have you tried using enable_seqscan = off and looked at the explain output then?

I think you'll find Postgres is choosing not to use the indexes
because they're just not helpful. If you disable seqscan it should use
the indexes but I expect it will be slower. The current plan is doing
a single pass through both tables using entirely sequential i/o.
That's about as fast as you could hope for it to be as your query does
require reading all the data.


-- 
greg

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to