Solved

get cpu usage required for query executed

Posted on 2003-12-10
3
146 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

732 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