On Sun, Mar 29, 2009 at 10:19 AM, Claudio Nanni wrote:
> An explain of the two statements yields the same plan,
> anybody knows if they are actually translated in the same plan?
There is a difference. The IN list is sorted so lookups can be done
as a binary search. A bunch of OR's just evaluate
An explain of the two statements yields the same plan,
anybody knows if they are actually translated in the same plan?
Claudio
Ian P. Christian wrote:
2009/3/29 Oscar :
Hi all-
I want to know what the difference between IN and OR is under the hood.
select * from dummy_table where id in (2
mation purposes only and shall not have any legally binding effect. Given
that e-mails can easily be subject to manipulation, we can not accept any
liability for the content provided.
> Date: Sun, 29 Mar 2009 09:13:10 +
> Subject: Re: IN vs. OR on performance
> From: poo...@pookey.
2009/3/29 Oscar :
> Hi all-
>
> I want to know what the difference between IN and OR is under the hood.
>
> select * from dummy_table where id in (2, 3, 4, 5, 6, 7);
>
> select * from dummy_table where id=2 or id=3 or id=4 or id=5 or id=6 or
> id=7;
I've have thought once the query is compiled, th
Hi all-
I want to know what the difference between IN and OR is under the hood.
select * from dummy_table where id in (2, 3, 4, 5, 6, 7);
select * from dummy_table where id=2 or id=3 or id=4 or id=5 or id=6 or
id=7;
I run the query sql on the test schema, it seems that there is no
performance d