Re: IN operator causes sequential scan (vs. multiple OR expressions)

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

 



Ryan Holmes <ryan@xxxxxxxxxxxxx> writes:
> I have a relatively simple query where the planner chooses a  
> sequential scan when using the IN operator but chooses an index scan  
> when using logically equivalent multiple OR expressions.

EXPLAIN ANALYZE for both, please?

If you set enable_seqscan = off, does that force an indexscan, and if so
what does EXPLAIN ANALYZE show in that case?

			regards, tom lane


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

  Powered by Linux