Calculate execution time of a SQL query?

前端 未结 8 434
悲&欢浪女
悲&欢浪女 2020-12-04 14:17

I am providing search functionality in my website, when user searches a record then I want to display the time the query taken to get the results same as google does. When w

8条回答
  •  执念已碎
    2020-12-04 15:02

    Please use

    -- turn on statistics IO for IO related 
    SET STATISTICS IO ON 
    GO
    

    and for time calculation use

    SET STATISTICS TIME ON
    GO
    

    then It will give result for every query . In messages window near query input window.

提交回复
热议问题