From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ozer, Pam <pozer@automotive.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow Query- Bad Row Estimate
Date: Fri, 29 Oct 2010 17:17:30 -0400
Message-ID: <9343.1288387050@sss.pgh.pa.us> (raw)
In-Reply-To: <216FFB77CBFAEE4B8EE4DF0A939FF1D1018354@mail-001.corp.automotive.com>
References: <216FFB77CBFAEE4B8EE4DF0A939FF1D1018354@mail-001.corp.automotive.com>
"Ozer, Pam" <pozer@automotive.com> writes:
> Unfortunately I have not received a response on this question. Is more
> information needed? Does anyone have any ideas why the estimates may be
> bad? Or what I might be able to do to speed this up?
The most likely explanation for the bad rowcount estimates is that there
is correlation between the regionid/countyid/cityid columns, only the
planner doesn't know it. Can you reformulate that data representation
at all, or at least avoid depending on it as a join key?
regards, tom lane
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: tgl@sss.pgh.pa.us, pozer@automotive.com
Subject: Re: Slow Query- Bad Row Estimate
In-Reply-To: <9343.1288387050@sss.pgh.pa.us>
* 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