摘要:
set nocount ongo--无效索引排序select top 20 db_name() as db_name ,schema_name(o.schema_id) as schema_name ,o.name as object_name ,i.name as index_name,i.is_unique_constraint,(case i.index_id when 1 then 'is_clustered' else '' end) as is_clustered ,ir.rowcnt ,s.user_updates ,(s.user_lo... 阅读全文
posted @ 2012-11-20 17:35
jinzhenshui
阅读(613)
评论(0)
推荐(0)
摘要:
set nocount onprint db_name()declare @tab_name sysnameset @tab_name='wfpuser_a0113'--内部碎片select '【内部】碎片' as frag_type ,ob.name as object_name ,ix.index_id,ix.name as index_name ,ps.index_level ,ps.partition_number ,ps.record_count ,ps.page_count ,ps.fragment_count ,str(ps.avg... 阅读全文
posted @ 2012-11-20 17:33
jinzhenshui
阅读(496)
评论(0)
推荐(2)
摘要:
set nocount ongoselect DB_NAME() as db_name ,d.name as object_name ,e.rowcnt ,str(c.avg_total_user_cost*(c.user_scans+c.user_seeks),16,0) as total_user_cost --总成本 ,str(c.avg_total_user_cost,16,0) as avg_total_user_cost --平均成本 ,c.avg_user_impact --平均收益(%) --,c.user_scans --受益 的 sca... 阅读全文
posted @ 2012-11-20 17:30
jinzhenshui
阅读(495)
评论(0)
推荐(1)
摘要:
set nocount onset transaction isolation level read uncommitted;with cte as( select t.session_id as spid,t.status,t.blocking_session_id as blocked ,t.program_name ,str(1.0* t.total_elapsed_time/1000,16,0) as duration_s ,str(1.0*(t.cpu_time+t.wait_time)/1000,16,0) as inter_duration_s ,str(... 阅读全文
posted @ 2012-11-20 16:41
jinzhenshui
阅读(404)
评论(0)
推荐(1)
浙公网安备 33010602011771号