Showing posts with label procedurebefore. Show all posts
Showing posts with label procedurebefore. Show all posts

Tuesday, March 27, 2012

Estimated Execution Time

Hi,
Is it possible to know the Estimated Execution Time of a stored procedure
before actual execution from VB/SQL Server Application ?DMP wrote:
> Hi,
> Is it possible to know the Estimated Execution Time of a stored
> procedure before actual execution from VB/SQL Server Application ?
Sure. From Query Analyzer, enter the execution text for the procedure
with the parameters you want and use the Query | Display Estimated
Execution Plan (CTRL + L). You can also use SET SHOWPLAN_ALL ON / OFF in
batches before the procedure to see a textual execution plan.
David Gugick
Imceda Software
www.imceda.com|||Yes of course, just look at this example:
SET SHOWPLAN_ALL ON
GO
Select sc.name,st.name,st.length from syscolumns sc
Inner join sysobjects so on
sc.id = so.id
Inner join systypes st on
sc.xtype = st.xtype
Where so.Xtype = 'U' And
so.name like 'Orders'
GO
SET SHOWPLAN_ALL OFF
GO
SET SHOWPLAN_TEXT ON
GO
Select sc.name,st.name,st.length from syscolumns sc
Inner join sysobjects so on
sc.id = so.id
Inner join systypes st on
sc.xtype = st.xtype
Where so.Xtype = 'U' And
so.name like 'Orders'
GO
SET SHOWPLAN_TEXT OFF
HTH, Jens Smeyer.
"DMP" <debdulal.mahapatra@.fi-tek.co.in> schrieb im Newsbeitrag
news:O2U$n5%23PFHA.244@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Is it possible to know the Estimated Execution Time of a stored procedure
> before actual execution from VB/SQL Server Application ?
>