79689208

Date: 2025-07-03 16:53:34
Score: 0.5
Natty:
Report link

I have seen that when there are thousands of records in the table a search by converting to char(8) is much faster than keeping the field as date itself.

change the line

and Date between 2011/02/25 and 2011/02/27

to

and convert(char(8), Date, 112) between '20110225' and '20110227'
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Polymath