November 2, 2005 at 6:53 am
Can I execute SQL statement without returning the results?
This sounds like a strange thing to do but there is a reason. I have been given the task of creating some benchmarking scripts that are to measure the time taken for a Server to perform different queries on different volumes of data. I am not interested in the data returned from the queries just how long they are taking.
I would be grateful for any ideas.
Thanks
Daniel
November 2, 2005 at 8:05 am
Removing the data being retuned to an application will more than likely reduce the amount of time and work to be done.
November 2, 2005 at 8:27 am
If you don't have any app that can recieve the data (assume this is select statements?) you could redirect it and insert into a temptable instead. Though, as Kory says - you should also measure the time it take to 'handle' the results (if it's any measurable volumes, that is)
/Kenneth
November 2, 2005 at 8:59 am
Thanks for the replies.
Personally I think benchmarking a server in this way is a waste of my time but my manager is very keen on the idea. lol.
There is no application and the data is randomly generated as part of the script. The idea is to generate some sort of routine to benchmark SQL Server's performance when it has deal with various amounts of data.
Therefore a query might be to aggregate a numeric column grouped on another column with 10 variations. Firstly this is done with 1 million records then 2 million record etc. As you can see the results aren't interesting to me, just the time taken for SQL to do the grouping/aggregations.
I had thought about using temp tables but I thought the overhead would be a little unfair on SQL.
Daniel
November 2, 2005 at 9:36 am
Capture the start and end times in a log or log table and discard the resulting output.
November 3, 2005 at 4:50 am
Try running from your client app and use some form of execute with no records option (I know that ADO can do this - I assume ADO.NET can also do it).
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply