Viewing 15 posts - 1 through 15 (of 17 total)
Hello all again!
Is it glitch of MS I've posted above?
Anyway, it seems I've reached my goal.
select
st.dbid db_id
,st.objectID
,isNull(OBJECT_NAME(st.objectID,st.dbid),'') as objName
,DB_Name(st.dbid) DBName
,max(execution_count) execution_count
fromsys.dm_exec_query_stats qs
cross apply sys.dm_exec_sql_text(sql_handle) as st
where total_logical_reads >0
and isNull(OBJECT_NAME(st.objectID,st.dbid),'')...
June 1, 2016 at 4:05 am
the query to compare results is:
select *,a.execution_count-isnull(case when a.execution_count>=b.execution_count then b.execution_count else 0 end,0) delta
from sp_stats_after_20m a full join sp_stats b on a.objName=b.objName and a.plan_handle=b.plan_handle
where a.objName is null or...
May 26, 2016 at 10:57 am
Hello again, I am happy of Your advises if any
I found a situation, that confused me
Once I've got a snapshot of sys.dm_exec_procedure_stats into temp table
after ~20 minutes I've got the...
May 26, 2016 at 5:31 am
I've updated a bit Your query
SELECT 'Purpose: the most used stored procedure, targets for tuning.' AS notes;
SELECT TOP (1) p.NAME AS [SP Name]
,qs.execution_count
,ISNULL(qs.execution_count / DATEDIFF(Second, qs.cached_time, GETDATE()), 0) AS [Calls/Second]
,qs.total_worker_time...
May 24, 2016 at 10:25 am
One glitch with the query You provide
once plan is recompiled, it shows wrong numbers
PS: sorry, not recompiled, but cached. In such case the plan for the SP is exluded from...
May 24, 2016 at 6:51 am
Actually, the goal is to provide the functionality to prevent the app firing the server and putting it down by excessive quering. Despite on the wrong app's coding or DOS...
May 23, 2016 at 2:24 pm
thank You very much Lowell!
I've recently had started one session, and put the server down by this statement:
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='EXEC_SP')
DROP EVENT...
May 23, 2016 at 11:44 am
actually, order the indexes creation script in a way to create the most covering indexes first. That will drammatically reduce the execution time. Unfortunatelly, MS did not allow the query...
August 5, 2014 at 10:29 pm
let me clarify a bit what I was meaning
create table t(id int PRIMARY KEY CLUSTERED, a varchar(256) null, b varchar(256) null, c varchar(256) null)
insert t select 1,'a','b','c'
create index IX_a on...
August 5, 2014 at 12:19 am
when creating the new index on a large table that already has some indexes, the new index could take a long time when tehre is alredy index with indexed...
August 4, 2014 at 7:51 am
i've found an issue
exec sp_replicationdboption @dbname = @_dbname, @optname = N'merge publish', @value = N'true' was not enough for the merge replica
in addition it needs to run
exec sp_replicationdboption @dbname...
June 20, 2014 at 2:41 am
I really confused ... no answer
August 20, 2013 at 3:22 am
select a.* from a join b
on a.fname in (b.fname,b.mname,b.lname) or
a.mname in (b.fname,b.mname,b.lname) ....
smth like this (i suppose)
October 3, 2005 at 12:04 am
Using trigger is very simple decision.
I want to use somewhat hard to understand by hackers.
tracking timestamp field I think is non standard step.
by other hand - it is...
April 14, 2005 at 12:40 am
In your Transform Data Task use ActiveX transformation. In transformation look at each column in each row. If there was datatype missmatch Just skip it using DTSTransformStat_SkipInsert constant in return...
April 13, 2005 at 8:40 am
Viewing 15 posts - 1 through 15 (of 17 total)