Home All Groups Group Topic Archive Search About
Author
13 Aug 2005 1:20 PM
Bpk. Adi Wira Kusuma
my question is:
"Is there different speed of process? or Which Statement owning quickest
performance speed in Process?"

DELETE FROM TB1 WHERE NOID LIKE 'A%' and FAge<=10
or

DELETE FROM TB1 WHERE  FAge<=10 and NOID LIKE 'A%'

You need to know that the field NOID have the index, While Fage [do] not
have index.

Do both statements above have same performance speed ?

Author
13 Aug 2005 2:26 PM
Dejan Sarka
Query Optimizer in SQL Server is quite smart thing, so the order of
conditions in the Where clause is not important. Both queries should produce
the same execution plan. You can check this in Query Analyzer.

--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

Show quote
"Bpk. Adi Wira Kusuma" <adi_wira_kus***@yahoo.com.sg> wrote in message
news:%2380FzsAoFHA.1088@TK2MSFTNGP14.phx.gbl...
> my question is:
> "Is there different speed of process? or Which Statement owning quickest
> performance speed in Process?"
>
> DELETE FROM TB1 WHERE NOID LIKE 'A%' and FAge<=10
> or
>
> DELETE FROM TB1 WHERE  FAge<=10 and NOID LIKE 'A%'
>
> You need to know that the field NOID have the index, While Fage [do] not
> have index.
>
> Do both statements above have same performance speed ?
>
>
Author
13 Aug 2005 2:30 PM
Mike Epprecht (SQL MVP)
Hi

Both will produce the same query plan as the optimizer will look at it and
evaluate it as being the same.

Regards--
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: m***@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

Show quote
"Bpk. Adi Wira Kusuma" <adi_wira_kus***@yahoo.com.sg> wrote in message
news:%2380FzsAoFHA.1088@TK2MSFTNGP14.phx.gbl...
> my question is:
> "Is there different speed of process? or Which Statement owning quickest
> performance speed in Process?"
>
> DELETE FROM TB1 WHERE NOID LIKE 'A%' and FAge<=10
> or
>
> DELETE FROM TB1 WHERE  FAge<=10 and NOID LIKE 'A%'
>
> You need to know that the field NOID have the index, While Fage [do] not
> have index.
>
> Do both statements above have same performance speed ?
>
>

AddThis Social Bookmark Button