At 14:25 -0700 7/18/03, SAQIB wrote:
Paul,
Does this optimize the query? I thought both of the queries will have the
same relational algebra representation. Am I wrong?
They're logically equivalent, yes.
You appear to be under the impression that MySQL will *not* optimize
your original statement.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, 18 Jul 2003 15:42:47 -0400, Chris Edwards wrote:
>I have multiple OR logic in the where clause.
> where id = 1 or id = 2 or id = 3
>The list is finite, at about 20 ids.
>
You can also do this:
where id in (1,2,3)
- --
jimoe at sohnen-
Paul,
Does this optimize the query? I thought both of the queries will have the
same relational algebra representation. Am I wrong?
Thanks.
Saqib Ali
-
http://www.xml-dev.com
On Fri, 18 Jul 2003, Paul DuBois wrote:
> At 15:42 -0400 7/18/03, Chris Edwards wrote:
> >Hi
> >
> >This has pr
At 15:42 -0400 7/18/03, Chris Edwards wrote:
Hi
This has probably come up before...
Using version 3.23.54
I have multiple OR logic in the where clause.
where id = 1 or id = 2 or id = 3
The list is finite, at about 20 ids.
I know i can say where != if the the OR count is more than half the
If your data is properly Normalized, then this is the best way.
Saqib Ali
-
http://www.xml-dev.com
On Fri, 18 Jul 2003, Chris Edwards wrote:
> Hi
>
> This has probably come up before...
>
> Using version 3.23.54
>
> I have multiple OR logic in the where clause.
>
> where id = 1 or id = 2
Hi
This has probably come up before...
Using version 3.23.54
I have multiple OR logic in the where clause.
where id = 1 or id = 2 or id = 3
The list is finite, at about 20 ids.
I know i can say where != if the the OR count is more than half the list
items
Is there any other way to provid