We published an update to our product today at 9 a.m. Then, at 2:30 p.m., we received a report of a slow server response.
Upon checking, we notice that SQL Server (Azure) created many query plans at once. I attached a screenshot below that shows one of the queries where SQL Server created four query plans. One of the query plan (ID: 6867681) did badly and it slows down the server.
My questions are:
- How SQL Server decides when to create new query plans?
- Can we configure the way hoq SQL Server create those query plans? What are the configurations available?
- Why SQL Server create the query plan at once (for many queries) instead of doing it one by one so it won’t affect the server performance.