use DATABASExxx DECLARE @st DATETIME = GETDATE() SELECT * FROM tableXXX SELECT DATEDIFF(MS, @st, GETDATE()) AS 执行时间