Re: oracle/sql "where clause"

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: 1996/09/26
Message-ID: <UmIPjCAKVpSyEwQr_at_jimsmith.demon.co.uk>#1/1


In article <324a091a.0_at_ntnews.compusmart.ab.ca>, Paul Chow <pschow_at_compusmart.ab.ca> writes
>howdy.
>
>does anyone know whether one of the following two where clauses is more
>efficient
>than the other ...
>
>[1]. select ...
> from ...
> where (field_x='K' or field_x='L' or field_x='M')
>
>[2]. select ...
> from ...
> where field_x in ('K','L','M')
>
>
>thanks for any help.
>
>-paul-
>
They are logically eqivalent, and I think the optimizer converts 'in' to a series of 'ors'.

-- 
Jim Smith
Received on Thu Sep 26 1996 - 00:00:00 CEST

Original text of this message