计算存储过程执行时长

declare @begin_date datetime
declare @end_date datetime
select @begin_date = getdate()
exec 存储过程名
select @end_date = getdate()
select datediff(ms,@begin_date,@end_date) as '用时/毫秒' 
---------------------

posted @ 2019-05-07 17:18  厦门哈韩  阅读(376)  评论(0编辑  收藏  举报