Re: Unexpected sequential scan on an indexed column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eddy Escardo-Raffo <eescardo@xxxxxxxxxx> writes:
> Do you guys have any idea why this is not working as I expect?

Datatype issue maybe?  When I try what seems to be the same case here
I get the expected indexscan, so I'm thinking the problem is that
the comparison isn't indexable, which is a possibility if the location
column isn't actually integer.

The fact that it's estimating 1000000 rows out is also extremely
suspicious --- it might or might not get the exact "2" estimate,
but I'd sure expect it to know that the majority of rows don't match.

			regards, tom lane

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux