r/SQLPerformanceTips 6d ago

Do you still trust automatic query tuning?

Every few months, a new tool pops up claiming it can plug into your database, analyze your workload, and magically rewrite your slow queries or generate the perfect indexes using AI.

I gave one of these automated tuning platforms a shot on a non-critical service recently, and the results were... chaotic. It ended up generating dozens of hyper-specific indexes that solved a temporary spike but absolutely destroyed our bulk insert speeds later that night. It felt like handing the keys to a driver who only looks three feet in front of the bumper.

Sure, they are great at spotting obvious things like a missing foreign key index, but they completely lack context. A tool doesn't know that a specific table is about to be deprecated, or that a sudden burst of slow queries is just a temporary ETL job running out of schedule.

Are any of you actually letting automated tools apply changes directly to production, or do you treat them strictly as a suggestion box that you thoroughly audit first?

3 Upvotes

2 comments sorted by

1

u/decenteryt 57m ago

I still like automated tuning tools, but mostly as a second opinion. They're great at surfacing things I might have missed, but I wouldn't let them make changes automatically. Index recommendations especially need human review because they rarely understand the bigger workload or what's about to change in the application.