Re: Request for help with slow query - Mailing list pgsql-performance

From Joshua D. Drake
Subject Re: Request for help with slow query
Date
Msg-id 508ED9DB.2010301@commandprompt.com
Whole thread Raw
In response to Re: Request for help with slow query  ("Woolcock, Sean" <Sean.Woolcock@emc.com>)
List pgsql-performance
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
onenow 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


pgsql-performance by date:

Previous
From: "Woolcock, Sean"
Date:
Subject: Re: Request for help with slow query
Next
From: Shaun Thomas
Date:
Subject: Re: Request for help with slow query