Forum Moderators: DixonJones
Try something like "website speed test" in your favourite search engine.
Dixon.
A 'button click' doesn't execute a query. It (normally) takes the browser to another address, which loads a page, which at some point calls a script which talks to the database and executes a query, returns some result which is output on the page.
The standard way for measuring execution time is to set a timestamp (using microtime) when the execution starts, and comparing it to another timestamp when it finishes. The difference is the execution time.
However, a good SQL database will let you find this out directly without having to use any external scripting.
If you are using .Net on IIS, you can configure the logging module to give you all sorts of extra information, including time taken to service a request. I'd suggest you check the IIS Logging docs at
[microsoft.com ]
Larry
Dim test1, test2, test3 As Double
' Start '
test1 = DateTime.Now.TimeOfDay.TotalMilliseconds
' Finish '
test2 = DateTime.Now.TimeOfDay.TotalMilliseconds
test3 = test2 - test1
Response.Write("Finished in " & Math.Round((test3 / 1000), 2) & " seconds.")