Keeping AI Queries Under Control

AI usage isn’t slowing down, and it continues to consume more and more electricity. Microsoft has recognized this and is acknowledging its own contributions thanks to the increased usage of GitHub Copilot chat in SSMS. Thankfully, they are already implementing a plan to offset the cost to the electrical grid caused by so many AI-generated queries.

Microsoft has announced that in an upcoming SQL Server Cumulative Update, a brand new feature will be rolled out along with a brand new DMV. To keep costs under control due so the heavy load of AI-generated queries in addition to the old-school human query (handcrafted with soul and love), SQL Server will utilize a new DMV called sys.dm_exec_is_copilot_query. If SQL Server determines that Copilot created the query, execution will be delayed until the local power grid hits an off-peak window.

As you upgrade to the latest SQL Server releases, note that if your queries (handcrafted or AI) are running slower than usual, they could be getting flagged as AI. We all know how well AI detectors are these days.

But maybe SQL Server will know better.

Happy April Fool’s Day. Thanks for reading!

Leave a comment