Bigger date ranges
A query that scans a day scans a month or a year, and its plan doesn’t suit the larger range.
Reports that run fine all month crawl at month end, just when finance needs them. How to find out why, before the next close.
During the month, reports cover a few days of data and few people run them. At month end, the whole finance team runs month-to-date and year-to-date reports at once, against a month of data, while late invoices are posted and the close jobs run. A query that took seconds now takes minutes, blocks others, and times out. By the next week it’s fast again and nobody investigates.
A query that scans a day scans a month or a year, and its plan doesn’t suit the larger range.
Many users running heavy reports at the same time compete for memory and CPU.
Postings, revaluations, and batch jobs running alongside reports, causing blocking.
Statistics haven’t caught up with the month’s new data, so plans are poor.
Step 1 of 4
Turn on Query Store or a monitoring tool before the close, so evidence is there.
Rank by total duration and waits during the close, not by single slow runs.
Find whether queries are waiting on CPU, disk, memory, or each other.
Restore a month-end copy and test index, query, or scheduling changes against it.
Often the lasting fix is to keep heavy reporting away from the live database during the close. For example: run month-end reports from a readable replica or a reporting copy refreshed after the main postings, and schedule batch jobs so they don’t overlap with the team’s busiest hours.
Tell us which reports slow down and when. A few lines are enough.