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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Are indexes ignored COALESCE is used in filter cri
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ElCapitan
Starting Member

28 Posts

Posted - 01/19/2009 :  06:21:06  Show Profile  Reply with Quote
Hi all,
Are indexes ignored when COALESCE is used in the WHERE clause criteria or INNER JOIN criteria?

Thanks for your time.

SwePeso
Patron Saint of Lost Yaks

Sweden
30281 Posts

Posted - 01/19/2009 :  06:23:22  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Most probably.

Use something like

WHERE (Col1 IS NULL OR Col1 = 'abc')

I am not sure which execution plan you will get instead.
It depends on many factors.



E 12°55'05.63"
N 56°04'39.26"
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.33 seconds. Powered By: Snitz Forums 2000