Re: Can Postgres use an INDEX over an OR?

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

 





2009/7/20 Robert James <srobertjames@xxxxxxxxx>

Hi. I notice that when I do a WHERE x, Postgres uses an index, and when I do WHERE y, it does so as well, but when I do WHERE x OR y, it doesn't. Why is this so?

It's not clever enough.

And how can I shut this off?

Use UNION/UNION ALL if possible in your case.


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

  Powered by Linux