From: Ron Mayer <rm_pg@cheapcomplexdevices.com>
To: Jim C. Nasby <jim@nasby.net>
Subject: Re: Forcing the use of particular execution plans
Date: Tue, 03 Oct 2006 17:10:04 -0700
Message-ID: <4522FBDC.3030706@cheapcomplexdevices.com> (raw)
In-Reply-To: <20060927201350.GS19827@nasby.net>
References: <000501c6e1ff$c80022c0$0340050a@sdg>
<007b01c6e24c$ccfc8190$8300a8c0@tridecap.com>
<20060927201350.GS19827@nasby.net>
Jim C. Nasby wrote:
>
> Index scans are also pretty picky about correlation. If you have really
> low correlation you don't want to index scan,
I'm still don't think "correlation" is the right metric
at all for making this decision.
If you have a list of addresses clustered by "zip"
the "correlation" of State, City, County, etc will all be zero (since
the zip codes don't match the alphabetical order of state or city names)
but index scans are still big wins because the data for any given
state or city will be packed on the same few pages - and in fact
the pages could be read mostly sequentially.
> but I think our current
> estimates make it too eager to switch to a seqscan.
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: rm_pg@cheapcomplexdevices.com, jim@nasby.net
Subject: Re: Forcing the use of particular execution plans
In-Reply-To: <4522FBDC.3030706@cheapcomplexdevices.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