Re: Can Postgres use an INDEX over an OR? - Mailing list pgsql-performance

From Віталій Тимчишин
Subject Re: Can Postgres use an INDEX over an OR?
Date
Msg-id 331e40660907192318t607eb913p520f531f3d65037e@mail.gmail.com
Whole thread Raw
In response to Can Postgres use an INDEX over an OR?  (Robert James <srobertjames@gmail.com>)
Responses Re: Can Postgres use an INDEX over an OR?
List pgsql-performance


2009/7/20 Robert James <srobertjames@gmail.com>

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.

pgsql-performance by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Fastest char datatype
Next
From: Chris
Date:
Subject: Re: Can Postgres use an INDEX over an OR?