Best Practice for Handling Large SQL Queries (40+ Seconds) That Run Only a Few Times Per Month?
Hi everyone,
I have a scenario where a very large SQL query processes data from multiple large tables and applies different joins, filters, and calculations before producing the final output. The execution time can sometimes reach 40+ seconds.
One important detail is that this process is not a frequent operation. It only occurs about 3 times per month, so optimizing for high-volume traffic is not a requirement.
Because of this, I'm questioning whether implementing a full asynchronous processing architecture is worth the added complexity. At the same time, simply increasing server timeouts doesn't feel like the best practice.
For a low-frequency but resource-intensive operation like this, what would you recommend?
- What approach have you used for similar low-frequency, long-running database operations?
I'd appreciate any recommendations or real-world experiences.
Thanks in advance!

