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.
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.'...
Trackbacks
Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.
Kommentare
Ansicht der Kommentare: Linear | Verschachtelt