Solved

get cpu usage required for query executed

Posted on 2003-12-10
3
144 Views
Last Modified: 2010-05-03
i am executing the queries using the recordset and ADODB connection with SQL server.how can i get all statistical information about query execution like cpu usage by the query, time for execution in miliseconds etc using Visual Basic code?
0
Comment
Question by:truptigadgil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 30

Accepted Solution

by:
nmcdermaid earned 130 total points
ID: 9913099
If you issue this statement to SQL Server:


SET STATISTICS PROFILE ON


then all the queries from then on will be executed, but they will return an extra recordset, this recordset contains the information you want.

You will need to parse the info out though.

SET SHOWPLAN_ALL ON does exactly the same thing only it does not run the query.

Look up SET SHOWPLAN_ALL and SET STATISTICS PROFILE in SQL Server books online for more info.

0
 
LVL 27

Expert Comment

by:planocz
ID: 10252186
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from truptigadgil from 12/10/2003 comment
Award points to nmcdermaid is recommend.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

planocz
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question