dbTalk Databases Forums  

which query is faster

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss which query is faster in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Vikram
 
Posts: n/a

Default which query is faster - 11-17-2005 , 01:13 AM






Which of the below mentioned query will be faster ?
and will the result of both the queries is same ?

A. select * from authors INNER join pubs
on authors.pubid=pud.id
where pub.active=1

B. select * from authors INNER join pubs
on (authors.pubid=pud.id and pub.active=1)



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: which query is faster - 11-17-2005 , 01:57 AM






Have you tested?

I cannot imagine there will be much difference if any.

What does the execution plan say?

Allan

"Vikram" <aa@aa> wrote


Quote:
Which of the below mentioned query will be faster ?
and will the result of both the queries is same ?

A. select * from authors INNER join pubs
on authors.pubid=pud.id
where pub.active=1

B. select * from authors INNER join pubs
on (authors.pubid=pud.id and pub.active=1)


Reply With Quote
  #3  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: which query is faster - 11-18-2005 , 07:34 AM



Vikram,

I will result in the same execution plan, hence the same result.

Ilya

"Vikram" <aa@aa> wrote

Quote:
Which of the below mentioned query will be faster ?
and will the result of both the queries is same ?

A. select * from authors INNER join pubs
on authors.pubid=pud.id
where pub.active=1

B. select * from authors INNER join pubs
on (authors.pubid=pud.id and pub.active=1)





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.