Re: Sequential Scan with LIMIT

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Jim C. Nasby" <decibel@decibel.org>
Cc: John Meinel <john@johnmeinel.com>, pgsql-performance@postgresql.org
Date: 2004-10-28T23:49:28Z
Lists: pgsql-performance
"Jim C. Nasby" <decibel@decibel.org> writes:
> On Sun, Oct 24, 2004 at 04:11:53PM -0400, Tom Lane wrote:
>> The test case you are showing is probably suffering from nonrandom
>> placement of this particular data value; which is something that the
>> statistics we keep are too crude to detect.
 
> Isn't that exactly what pg_stats.correlation is?

No.  A far-from-zero correlation gives you a clue that on average, *all*
the data values are placed nonrandomly ... but it doesn't really tell
you much one way or the other about a single data value.

			regards, tom lane