-
easy query efficiency question
Hi,
Could someone confirm that the following query:
update table set x=1, y=1, z=1 where a = 1 or b = 1 or c = 1 or d = 1
is more efficient than this query:
update table set x=1, y=1, z=1 where e <> 1 and f <> 1 and g <> 1
Thanks!
-
easy query efficiency question (reply)
Hi John,
Your question is in SQL 6.5 discussion Group.
In the both case the optimizer decides a 'table scan'
In the first request because of "OR"
In the second because of "Not ="
You could look at the optimizer decision by a quick look at the query plan. Even if the request is not started.
Bye
Patrick
------------
John at 7/7/01 1:40:56 PM
Hi,
Could someone confirm that the following query:
update table set x=1, y=1, z=1 where a = 1 or b = 1 or c = 1 or d = 1
is more efficient than this query:
update table set x=1, y=1, z=1 where e <> 1 and f <> 1 and g <> 1
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|