Re: Use "average field correlation per hard disk page" instead of global one? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Use "average field correlation per hard disk page" instead of global one?
Date
Msg-id 2610.1078895303@sss.pgh.pa.us
Whole thread Raw
In response to Use "average field correlation per hard disk page" instead of global one?  (Alexey Nalbat <alexey@price.ru>)
Responses Re: Use "average field correlation per hard disk  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Alexey Nalbat <alexey@price.ru> writes:
> Due to the updating algorithm the physical order of tuples in the
> table happens to be such that all equal keys are placed together,
> but not ordered globally.

Hmm... this is of course a weak spot of the correlation-based estimation
method.  If you were doing a range query then the computed correlation
might have some bearing on the cost, but when probing for a single key
value, your table will behave much differently than the correlation model
can guess.

> Are there any better ideas?

None at the moment, but I'm open to suggestions.  It seems like we might
need different stats for equality probes than range probes.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Timing of 'SELECT 1'
Next
From: Philip Warner
Date:
Subject: Re: Use "average field correlation per hard disk