存储过程查询次数与耗时排名

use <database_name>
select top 500 * into #tb from Sys_LoggerOperate where CreateTime > dateadd(day, -1, getdate()) order by time desc
select action 接口名,count(1) 上榜次数,avg(time) 平均时间,max(time) 最长时间,min(time) 最短时间 from #tb group by Action
Order by count(1) desc

  

posted @ 2024-08-12 17:38  zhaoguanhao  阅读(3)  评论(0编辑  收藏  举报