Re: More efficient OR
От | Sean Davis |
---|---|
Тема | Re: More efficient OR |
Дата | |
Msg-id | BFC3420B-8036-11D9-B22E-000D933565E8@mail.nih.gov обсуждение исходный текст |
Ответ на | More efficient OR ("Keith Worthington" <keithw@narrowpathinc.com>) |
Ответы |
Re: More efficient OR
|
Список | pgsql-sql |
Could 'in' or 'between' do what you want? I know that using 'in' is equivalent to what you have below. Could 'between' be more efficient--you could do explain analyze on various options to see what the actual plan would be. Sean On Feb 16, 2005, at 11:02 AM, 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? > > Kind Regards, > Keith > > ---------------------------(end of > broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings
В списке pgsql-sql по дате отправления: