Re: More efficient OR
От
Reinoud van Leeuwen
Тема
Re: More efficient OR
Дата
Msg-id
20050216161508.GW4705@spoetnik.xs4all.nl
Ответ на
More efficient OR (Keith Worthington)
Список
Дерево обсуждения
Re: More efficient OR KÖPFERL Robert <robert.koepferl@sonorys.at>
On Wed, Feb 16, 2005 at 11:02:59AM -0500, Keith Worthington wrote:
> Hi All,
>
> In several of my SQL statements I have to use a WHERE clause that contains
> mutiple ORs. i.e.
>
> WHERE column1 = 'A' OR
> column1 = 'B' OR
> column1 = 'C'
>
> Is there a more efficient SQL statement that accomplishes the same limiting
> functionality?
I do not know wheter it is more efficient in terms of execution, but I can
read this more efficiently:
WHERE column1 in ('A', 'B', 'C')
--
__________________________________________________
"Nothing is as subjective as reality"
Reinoud van Leeuwen reinoud.v@n.leeuwen.net
http://www.xs4all.nl/~reinoud
__________________________________________________
В списке pgsql-sql по дате отправления