Re: Forcing the use of particular execution plans

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Subject: Re: Forcing the use of particular execution plans
Date: 2006-10-04 00:10:04
Message-ID: 4522FBDC.3030706@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2006-10-04 00:55:45 Re: Forcing the use of particular execution plans
Previous Message Adnan DURSUN 2006-10-03 23:53:20 Re: PostgreSQL Caching