If I execute the stored procedure generating this plan to return data for a single date, the execution finishes in < 3 minutes. When I pass a date range into the procedure, the run takes almost 20 minutes. I understand since more records are being returned there will be an obvious time increase, but I am curious where I would look and how I would begin to speed up queries where the brunt of the overhead is on the sorting subtree. any help is appreciated.
By deadLock 0 asked Jun 23 at 04:41 PM