Re: Unused index influencing sequential scan plan

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

 



Thom Brown <thom@xxxxxxxxx> writes:
> I've created a test table containing 21 million random dates and
> times, but I get wildly different results when I introduce a
> functional index then ANALYSE again, even though it doesn't use the
> index:

As Peter said, the existence of the index causes ANALYZE to gather stats
about the expression, which will affect rowcount estimates whether or
not the planner chooses to use the index.

> And as a side note, how come it's impossible to get the planner to use
> an index-only scan to satisfy the query (disabling sequential and
> regular index scans)?

Implementation restriction - we don't yet have a way to match index-only
scans to expressions.

			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