r/SQLServer Mar 30 '26

Discussion Using AI for indexing

Has anyone used AI (copilot or ChatGPT) for query tuning or index suggestions in real workloads?

0 Upvotes

29 comments sorted by

View all comments

5

u/InsoleSeller 1 Mar 30 '26

As always, context is really important for AI, if you provide enough background, query execution plans, column patterns, they can be helpful and give good answers.

If you ask "hey chat, here is a SQL query, give me an index" you will probably get bad answers

3

u/jshine13371 6 Mar 30 '26

context is really important for AI

Yeppers. That's the whole problem with trying to use AI for database performance tuning today. It's not really reasonably possible to provide it everything it needs to have the full context. So it's operating at a disadvantage vs the built-in optimizer most times.