August 21, 2006 at 1:28 am
Hi
Given Constaints like table size, columns and indexes can we find out how long does a query takes to execute?
Is it possible to find out wihtout actually executing the query?
August 21, 2006 at 4:05 am
You can select getdate() at the beginning and end of the query, but bear in mind this will only be accurate to 3ms. You can also run Profiler and look at the Duration column for the particular event. It's not possible to find out without executing the query since you don't know in advance what other factors will be in play at the time of execution.
John
August 21, 2006 at 10:17 pm
Hi John
Thanks for the reply.Is there any way to get an estimation of the query execution time from the Query execution plan
Thanks in advance
August 22, 2006 at 1:46 am
You can get an estimate of I/O and CPU cost, but in order to translate that into an execution time, the query optimiser would have to guess what hardware you have and how well it works, as well as what else will be happening on the server at the time the query is run. So I'm afraid the answer to question is No.
John
August 22, 2006 at 10:11 am
Is this related to notification services? There is also "set statistics time on" and "set statistics io on" which can be handy.
RandyHelpdesk: Perhaps Im not the only one that does not know what you are doing. 😉
August 25, 2006 at 3:29 am
There are severals ways to find execution time from the Query execution plan :
http://www.sql-server-performance.com/query_execution_plan_analysis.asp
August 25, 2006 at 4:40 am
Mmmm.... I didn't find anything on that page about execution times. But I like rstone's idea of SET STATISTICS TIME ON.
John
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply