Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query performense
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 10/09/2012 :  06:01:59  Show Profile  Reply with Quote
I write two queries
1) ...where id is NUll
it takes 2.45 minutes
2)....where id='asfvdjs362913bds'
it take less than a seconds
how this time differ?
please help me. I am waiting for your valuable suggestions.

I have 160000 record in that table and in that table id doesn't have null value.

Edited by - Avinash_B on 10/09/2012 06:12:14

The Chadinator

1974 Posts

Posted - 10/09/2012 :  14:25:31  Show Profile  Visit chadmat's Homepage  Reply with Quote
Look at the query plan for each query.

Go to Top of Page

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 10/09/2012 :  16:11:19  Show Profile  Visit jackv's Homepage  Reply with Quote
One is probably doing a Scan , the other a seek?

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000