SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

Avinash_B
Starting Member

India
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

chadmat
The Chadinator

USA
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.

-Chad
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2067 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
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.06 seconds. Powered By: Snitz Forums 2000