Ibrahim Hafidh

SQL Server, Data Warehouse, Business Intelligence, Data Mining and Web Development

Viewing Query Plans

Posted by ihafidh on September 18, 2008

This is more of a reminder to myself. I can’t always remember the commands to show the execution plan in text. It’s nice having the graphical interface but when you have a big execution plan then seeing it in text is much easier. Here are the commands:

– simple estimated execution plan
set showplan_text on
GO
–*** estimated execution plan with more detail. best to use this ****
set showplan_all on
GO
– actual execution plan. runs the query. so it’s better to use showplan_all for a big query 
set statistics profile on
GO
More detail here

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>