Sql-server – Execution Plans Query

execution-plansql server

I want to check the estimated number of rows of a query in MS SQL Server. I can right click on the query and select "display estimated execution plan". but I want to do the exact thing with a hard code query. Is there any way to do this without using the GUI?

Best Answer

Use:

set showplan_xml on;
go
Your query;
go
set showplan_xml off;
go

This will give the XML, and you should be able to see the Estimates in there.