Re: Forcing the use of particular execution plans - Mailing list pgsql-performance

From Ron Mayer
Subject Re: Forcing the use of particular execution plans
Date
Msg-id 4522FBDC.3030706@cheapcomplexdevices.com
Whole thread Raw
In response to Re: Forcing the use of particular execution plans  ("Jim C. Nasby" <jim@nasby.net>)
Responses Re: Forcing the use of particular execution plans
List 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.

pgsql-performance by date:

Previous
From: "Adnan DURSUN"
Date:
Subject: Re: PostgreSQL Caching
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Forcing the use of particular execution plans