sql server execution plans

9
SQL Server 2005 – Reading and Interpreting Query Plans Florin Cardaşim Lead developer RomSoft, IAŞI, http://www.rms.ro

Upload: florin-cardasim

Post on 12-May-2015

422 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sql Server execution plans

SQL Server 2005 – Reading and Interpreting Query PlansSQL Server 2005 – Reading and Interpreting Query PlansFlorin CardaşimLead developerRomSoft, IAŞI, http://www.rms.ro

Florin CardaşimLead developerRomSoft, IAŞI, http://www.rms.ro

Page 2: Sql Server execution plans
Page 3: Sql Server execution plans

AgendaAgenda

• Graphic, Xml and Text query plans• One-table SELECT • Table Join SELECT• INSERT, UPDATE, DELETE

• Graphic, Xml and Text query plans• One-table SELECT • Table Join SELECT• INSERT, UPDATE, DELETE

Page 4: Sql Server execution plans

http://en.wikipedia.org/wiki/Microsoft_SQL_Server

Sql Server ArchitectureSql Server Architecture

Page 5: Sql Server execution plans
Page 6: Sql Server execution plans

DemoDemo

The tools: Management Studio Server Profiler Tuning Advisor

Execution plans representations: Text (SHOWPLAN_ALL, SHOWPLAN_TEXT,

STATISTICS PROFILE) XML (SHOWPLAN_XML, STATISTICS XML) Graphical

The tools: Management Studio Server Profiler Tuning Advisor

Execution plans representations: Text (SHOWPLAN_ALL, SHOWPLAN_TEXT,

STATISTICS PROFILE) XML (SHOWPLAN_XML, STATISTICS XML) Graphical

Page 7: Sql Server execution plans

Clustered index: stores the data along with the lookup values of the index and sorts the data physically; implemented as B-tree(balanced)

Non-clustered index: sorts the columns included in the index, but it doesn’t sorts the data

Page 8: Sql Server execution plans

Q&AQ&A

Page 9: Sql Server execution plans

Thank you!Thank you!

Florin CardaşimLead developerRomSoft, IAŞI, http://www.rms.ro

Florin CardaşimLead developerRomSoft, IAŞI, http://www.rms.ro