If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > In(),not In(),exist(), Not Exist(), !like()

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-03-09, 03:32
AnushreeDarshane AnushreeDarshane is offline
Registered User
 
Join Date: Jul 2009
Posts: 1
In(),not In(),exist(), Not Exist(), !like()

I want the performance of IN(),NOT IN(),EXIST(), NOT EXIST(), LIKE(), NOT LIKE() In sql 2005
Which one is slower in execution and which is best to fetch records as per execution time.
Anybody have any ideas ?

Last edited by AnushreeDarshane; 07-03-09 at 06:01.
Reply With Quote
  #2 (permalink)  
Old 07-03-09, 03:57
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,602
Nope, I can't understand what you're asking at all. Maybe someone else will, but I think you'd be better off if you tried to rephrase your question.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old 12-02-10, 12:25
shaktii shaktii is offline
Registered User
 
Join Date: Dec 2010
Posts: 1
Got Answer

Hi Anushree,
I am also facing same question.
It will be appreciated if you could post the answers if you have.
Also have one more question searching answer from last 2 years.....
Reply With Quote
  #4 (permalink)  
Old 12-02-10, 12:49
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,602
The answers are:

1) It depends on the data
2) It depends on what criteria determine "best"
3) Yes.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #5 (permalink)  
Old 12-02-10, 12:59
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
As Pat said. Typically, though, exists and not exists should be faster, due to they only look for a single occurence of some condition. Though, there are times that the IN can be used for index matching and it would be faster.
Dave
Reply With Quote
  #6 (permalink)  
Old 12-02-10, 15:24
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
No sig spam yet? You guys are getting lazy.
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On