Solved

get cpu usage required for query executed

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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.
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 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…

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now