pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: Woolcock, Sean <Sean.Woolcock@emc.com>
Cc: salah jubeh <s_jubeh@yahoo.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Request for help with slow query
Date: Mon, 29 Oct 2012 12:32:43 -0700
Message-ID: <508ED9DB.2010301@commandprompt.com> (raw)
In-Reply-To: <998490E92A198A48BE60F3A9C44CA3F1010A7DCF3903@MX40A.corp.emc.com>
References: <998490E92A198A48BE60F3A9C44CA3F1010A7DCF3901@MX40A.corp.emc.com>
	<1351538299.55595.YahooMailNeo@web122203.mail.ne1.yahoo.com>
	<998490E92A198A48BE60F3A9C44CA3F1010A7DCF3903@MX40A.corp.emc.com>


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




view thread (9+ messages)  latest in thread

Message-ID: <508ED9DB.2010301@commandprompt.com>
Permalink:  ../508ED9DB.2010301@commandprompt.com/
Also on:    postgresql.org/message-id/508ED9DB.2010301@commandprompt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jd@commandprompt.com, Sean.Woolcock@emc.com, s_jubeh@yahoo.com
  Subject: Re: Request for help with slow query
  In-Reply-To: <508ED9DB.2010301@commandprompt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox