Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time statement containing user function

Status
Not open for further replies.

sunaj

Technical User
Feb 13, 2001
1,474
DK
Hi,

In the Query analyser:
----------------------------------------------
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
SET STATISTICS IO ON
SET STATISTICS TIME ON
select top 1000 dbo.UF_SetPrec([Temp],tempprec) as [Temp], dbo.UF_SetPrec(Salt,SaltPrec) as Salt from tblST_Float
----------------------------------------------
The execution takes 3-4 seconds, but when I look at the execution time reported by the STATISTICS is says 0 ms! (if I crank it up to top 10000 i get a value - but WAY less that the actual execution time).
What is going on?
Does it not measure the time the user function uses?
How do I measure the total time precisely?

Thx in advance


Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top