December 13, 2012 at 10:39 am
Michael T2 (12/13/2012)
using that, i still have the table scans. if i only use
and (txSubtype > 'BACKORDER'
or txSubtype < 'BACKORDER'
then the scans go away.Strange.
I am going to read up on sargable now.
Also the <> will produce scans.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
December 14, 2012 at 6:29 am
Michael T2 (12/13/2012)
using that, i still have the table scans. if i only use
and (txSubtype > 'BACKORDER'
or txSubtype < 'BACKORDER'
then the scans go away.Strange.
I am going to read up on sargable now.
It won't be once you've read up on sargable... 🙂
This may help:
http://vadivel.blogspot.co.uk/2011/11/what-does-avoid-non-sargable-where.html
Regards,
Dave.
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply