Cannot interpret EXPLAIN

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

 



Hi,

I have a query SELECT * FROM myTable WHERE ((myCol = var1) OR (myCol = var2))

.. which produces the following EXLAIN output:


Index Scan using myIndex on myTable (cost=0.00..8.28 rows=1 width=537)
 Filter: ((myCol = $1) OR (myCol = $2))


The index "myIndex" is an index on column "myCol". However I expected an "Index Cond:" row instead of a "Filter:" row, which normally indicates performance problems. Should I rather split the OR and use two SELECT statements to get my result (var1!=var2)? Namely in this case, "Index Cond:" is outputed by EXPLAIN.

--Jörg Kiegeland

--
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