Langsung ke konten utama

Postingan

Menampilkan postingan dari September, 2019

Monitoring performance Azure SQL Database using dynamic management views

Microsoft Azure SQL Database enables a subset of dynamic management views to diagnose performance problems, which might be caused by blocked or long-running queries, resource bottlenecks, poor query plans, and so on. This topic provides information on how to detect common performance problems by using dynamic management views. SQL Database partially supports three categories of dynamic management views: Database-related dynamic management views. Execution-related dynamic management views. Transaction-related dynamic management views. Identify CPU performance issues If CPU consumption is above 80% for extended periods of time, consider the following troubleshooting steps: The CPU issue is occurring now If issue is occurring right now, there are two possible scenarios: Many individual queries that cumulatively consume high CPU Use the following query to identify top query hashes: Long running queries that consume CPU are still running Use the following query t...

Unused Index Script - SQL Server

Anyway, the scripts is a good starting point. You should pay attention to User Scan, User Lookup and User Update when you are going to drop the index. The generic understanding is if this value is all high and User Seek is low, the index needs tuning. The index drop script is also provided in the last column. Query Listing All the Indexes Key Column with Included Column That’s a great script (as yours always are), however I think you are missing another class of “missing indexes”, and that is indexes that don’t have stats at all. Rows are only written to dm_db_index_usage_stats when an index is used. If that index is totally un-used (even for writing to), it won’t appear in dm_db_index_usage_stats and therefore won’t be included in your script. Try this on a production system, you might be surprised by how many rows it returns: