Skip to content

DBA 101: Comparing two SQL plans

'Simple post today: How to compare two plans in SSMS.

This task is a task that is often done by a DBA or developer who is wanting to compare changes of an index or perhaps even comparing queries between DEV and PROD.

As an example, we take the following AdventureWorks2012 query:

SELECT DISTINCT City
FROM Person.Address
WHERE ModifiedDate = ‘2007-05-01’

And save the query plan as a .SQLPLAN file.

image_thumb[1]

Having noted the KEY LOOKUP operator, I know this query can be improved with by adding City to the ncl_demo index as an included column.

For fun, I also ran the plan through my query plan website: HowsMyPlan.com and it noted the same concern.'...

http://www.sqlservercentral.com/blogs/confessions-of-a-microsoft-addict/2017/04/14/dba-101-comparing-two-sql-plans/?utm_source=SSC&utm_medium=pubemail

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