Wednesday, March 21, 2012

Measuring CPU usage to compile Ad-hoc TSQL

SQL Sever gurus,
Is there a way to measure the CPU utilization to compiling Ad-Hoc SQL
statements?Hi,
Use profiler and use the event SQL Completed. In the data columns select
CPU.
Thanks
Hari
SQL Server MVP
<raidken@.yahoo.com> wrote in message
news:1159403934.462700.300110@.e3g2000cwe.googlegroups.com...
> SQL Sever gurus,
> Is there a way to measure the CPU utilization to compiling Ad-Hoc SQL
> statements?
>|||Wouldn't that give you more than just the compile time?
SET STATISTICS PROFILE ON or SET STATISTICS TIME ON would give you server
parse and comopile time.
Linchi
"Hari Prasad" wrote:
> Hi,
> Use profiler and use the event SQL Completed. In the data columns select
> CPU.
> Thanks
> Hari
> SQL Server MVP
> <raidken@.yahoo.com> wrote in message
> news:1159403934.462700.300110@.e3g2000cwe.googlegroups.com...
> > SQL Sever gurus,
> >
> > Is there a way to measure the CPU utilization to compiling Ad-Hoc SQL
> > statements?
> >
>
>|||I believe that the "SQL Completed" profiler event will return the total
CPU time it took from compiling to executing the SQL statement. In
effect, it will not identify the CPU time taken to compile exclusively.
Is my understanding corrent?
Hari Prasad wrote:
> Hi,
> Use profiler and use the event SQL Completed. In the data columns select
> CPU.
> Thanks
> Hari
> SQL Server MVP
> <raidken@.yahoo.com> wrote in message
> news:1159403934.462700.300110@.e3g2000cwe.googlegroups.com...
> > SQL Sever gurus,
> >
> > Is there a way to measure the CPU utilization to compiling Ad-Hoc SQL
> > statements?
> >

No comments:

Post a Comment