April 21, 2012 at 5:18 am
hi all
i am running same query with union and or condition.both are almost taking same time i mean in seconds.but i want to know the CPU usage of the both query. how to see the CPU usage of each query?
thanks in advance:-P:-P:-P
--------------------------------------------------------
I am Learner -- SQL
April 21, 2012 at 5:36 am
A better (and easier!) idea might be to compare the execution plans for the two queries.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
April 21, 2012 at 5:48 am
SET Statistics Time On
You can compare the exec plans, but do note that lower cost does not always mean faster query, the costs are estimates created at compile time.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2012 at 6:45 am
den how to etimate which one is best ?:-P
--------------------------------------------------------
I am Learner -- SQL
April 21, 2012 at 6:46 am
GilaMonster (4/21/2012)
SET Statistics Time On
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2012 at 1:09 pm
If you're comparing queries i'd be inclined to check i/o too...
SET STATISTICS IO ON
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply