"unbiased" Query CP Usage | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

"unbiased" Query CP Usage

I am trying to Log Server CPU time for queries by each user. My Front end is VB.NET. What T-SQL can I use to return the CPUusage of the submitted query? This number should be unbiased on the Client Configuration, Network congestion and speed etc. For example, is the "CPU Time" returned by "SET STATISTICS TIME ON" as good measure of the CP Usge, or will the same query return different CPU Times from different clients? Thank you.

i do not believe there is a good way of doing this
unless each user connects directly to SQL Server (without going through an web/app server)
in which case you can use profiler but you might think real hard about whether you must absolutely have this capability or just think its a neat trick
No – it’s not a neat trick at all. I have been asked to formulate a methodology to "charge" projects using the database based on cpu time (or some other parameter). There is no middle tier. This is an Intranet Application – so the front end talks directly with the SQL Server. Hope this gives you some more information. Thanks.

use profiler
include the hostname column
]]>