Skip to content

Finding the Worst Performing TSQL Statement

'Have you ever wondered how to find the worst performing TSQL queries on your instance? If you have, you are not alone. 

SQL Server maintains query statistics as TSQL commands are run. These query statistics can be returned by using the Dynamic Management Objects provided in SQL Server.

The Dynamic Management Objects sys_dm.exec_query_stats returns a view of the query statistics that SQL Server is currently maintaining. The statistics that this view returned are stored in memory with the cached plan for each query. As long a TSQL execution plan is stored in the plan cache you can return statistics for the TSQL command. Once the command is removed from the procedure cache, then the statistics are also dropped.'...

http://www.databasejournal.com/tips/finding-the-worst-performing-tsql-statement.html

Trackbacks

Keine Trackbacks

Kommentare

Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.

Kommentar schreiben

Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.
CAPTCHA

Formular-Optionen