Please don't reply to previous messages to start new threads. This makes it
harder to find stuff in the archives and may keep people from noticing your
message.
On Wed, May 17, 2006 at 08:54:52 -0700,
Craig A. James [EMAIL PROTECTED] wrote:
Here's a corner case that might interest someone. It
On Wed, 2006-05-17 at 08:54 -0700, Craig A. James wrote:
Here's a corner case that might interest someone. It tripped up one of our
programmers.
We have a table with 10 million rows. The ID column is indexed, the table
has been vacuum/analyzed. Compare these two queries:
select *
Bruno Wolff III [EMAIL PROTECTED] writes:
I suspect it wasn't intended to be a full table scan. But rather a sequential
scan until it found a matching row. If the data in the table is ordered by
by id, this strategy may not work out well. Where as if the data is randomly
ordered, it would be
Tom Lane wrote:
There is not anything in there that considers whether the table's
physical order is so nonrandom that the search will take much longer
than it would given uniform distribution. It might be possible to do
something with the correlation statistic in simple cases ...
In this
On Wed, May 17, 2006 at 08:54:52AM -0700, Craig A. James wrote:
Here's a corner case that might interest someone. It tripped up one of
our programmers.
We have a table with 10 million rows. The ID column is indexed, the
table has been vacuum/analyzed. Compare these two queries: