Hi,
Just wanting some opinions... is it better to eliminate an index SCAN (cost is 98%) with an [index SEEK (cost 15%) + key lookup (cost 15%)]? I accomplished this by adding a DESC index on one of the key lookup date fields.
Logical reads also went from 30000+ to 3 by adding the sorted index on the date field.
Estimated I/O cost went from 25 to .003 as well.
Seems like it definitely improved things, but performance-wise there was no difference (not enough rows I guess to tell).
Side note:
It's confusing to me b/c the WHERE clause looks like:
WHERE EndDate = '2009-01-01'
AND StartDate = '2009-03-01'
but I only put the sorted index on "EndDate" not "StartDate". Putting an index on "StartDate" didn't seem to have any effect.
Thank you
Just wanting some opinions... is it better to eliminate an index SCAN (cost is 98%) with an [index SEEK (cost 15%) + key lookup (cost 15%)]? I accomplished this by adding a DESC index on one of the key lookup date fields.
Logical reads also went from 30000+ to 3 by adding the sorted index on the date field.
Estimated I/O cost went from 25 to .003 as well.
Seems like it definitely improved things, but performance-wise there was no difference (not enough rows I guess to tell).
Side note:
It's confusing to me b/c the WHERE clause looks like:
WHERE EndDate = '2009-01-01'
AND StartDate = '2009-03-01'
but I only put the sorted index on "EndDate" not "StartDate". Putting an index on "StartDate" didn't seem to have any effect.
Thank you