February 24, 2014 at 6:57 am
hi
my procedure is taking more cpu time, how to reduce this.
select r.total_elapsed_time, r.cpu_time, r.logical_reads, r.reads, r.writes
from sys.dm_exec_requests r (nolock)
where r.session_id = @@spid
total_elapsed_timecpu_timelogical_readsreads writes
140371170373451470 53
my question is : how to redece this cpu_time.
please provide the possible optioins for this.
February 24, 2014 at 7:09 am
Tune the query, tune the indexes. Without more information that's about all that can be said.
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
February 24, 2014 at 7:18 am
GilaMonster (2/24/2014)
Tune the query, tune the indexes. Without more information that's about all that can be said.
Also, if you have an inline table switch to a temp table so that you can get a true execution plan...gila is right, unless you provide more information there's not much to add...
February 24, 2014 at 7:26 am
stormsentinelcammy (2/24/2014)
GilaMonster (2/24/2014)
Tune the query, tune the indexes. Without more information that's about all that can be said.Also, if you have an inline table switch to a temp table so that you can get a true execution plan
No problems with inline tables (derived tables) and execution plans.
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
February 24, 2014 at 8:27 am
GilaMonster (2/24/2014)
stormsentinelcammy (2/24/2014)
GilaMonster (2/24/2014)
Tune the query, tune the indexes. Without more information that's about all that can be said.Also, if you have an inline table switch to a temp table so that you can get a true execution plan
No problems with inline tables (derived tables) and execution plans.
apologies, I meant to say table variables 😛
February 24, 2014 at 12:56 pm
Check the execution plan and see if it needs any index or maintenance.
--
SQLBuddy
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply