Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Forcing the use of particular execution plans


  • From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
  • To: "Jim C. Nasby" <jim(at)nasby(dot)net>
  • To: pgsql-performance(at)postgresql(dot)org
  • Subject: Re: Forcing the use of particular execution plans
  • Date: Tue, 03 Oct 2006 17:10:04 -0700
  • Message-id: <4522FBDC(dot)3030706(at)cheapcomplexdevices(dot)com>

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.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group