On 10/29/2012 12:25 PM, Woolcock, Sean wrote:

I thought that an index was implicitly created for foreign keys, but I see that 
that's not true. I've just created one now and re-ran the query but it did not 
change the query plan or run time.

1. Explain analyze, not explain please

Check to see if estimated rows differs wildly from actual.

2. Seriously... 8.1? That is not supported. Please upgrade to a supported version of PostgreSQL.

http://www.postgresql.org/support/versioning/

3. Simple things:

 A. Have you run analyze on the two tables?
 B. What is your default_statistics_target?

Joshua D. Drake

--
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC
@cmdpromptinc - 509-416-6579


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

Reply via email to