I have posted an image of the user inputs here:
The problem is that I am given a range of days (Dec 22 - Mar 22) over a range of years (1900 - 2009) and the range of days can span from one year to the next. This is not the same as saying Dec 22, 1900 to Mar 22, 2009, for which I do not need date math.
What you really need to do is not do date arithmetic using text-string
operations. The planner has no intelligence about that whatsoever.
Convert the operations to something natural using real date or timestamp
types, and then look at what indexes you need.
Any suggestions on how to go about this?
Thanks again!
Dave