473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using DiskIO in sp_who2

Is there any way to calculate (just an approximation is fine) the
amount of work that is done for an insert statement?

For example, can I calculate the approximate row size of my table and
then compare that with the DiskIO for my SPID to determine
approximately how many rows have already been written? Or, does the
DiskIO include shuffling data around or other DiskIO that makes this
kind of comparison impossible?

Thanks,
-Tom.

Jul 23 '05 #1
1 6315
Thomas R. Hummel (to********@hotmail.com) writes:
Is there any way to calculate (just an approximation is fine) the
amount of work that is done for an insert statement?

For example, can I calculate the approximate row size of my table and
then compare that with the DiskIO for my SPID to determine
approximately how many rows have already been written? Or, does the
DiskIO include shuffling data around or other DiskIO that makes this
kind of comparison impossible?


First of all, you need to take indexes in account. And you would really
have an idea of how many page splits your INSERT till cause. If you
insert rows at the end of the clustered index, there is no so much
page splits (but could still be in the NC indexes). If your INSERT is
not correlated with the clustered indexes, then there can be a lot more
page splits.

One more thing to account for is checking of FK constraints. I don't
really know when they set in.

And, um, you need to get the rows from somewhere. If you are doing
INSERT SELECT, then the SELECT eats disk IO too.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: rawCoder | last post by:
Hi All, I have a *.cer file, a public key of some one and I want to encrypt some thing using this public key. Can someone point me to a sample code for Encrypting some file using...
1
by: Mike | last post by:
When trying to compile (using Visual Web Developer 2005 Express Beta; frameworkv2.0.50215 ) the source code below I get errors (listed below due to the use of ICallBackEventHandler. Ultimately I...
10
by: Christopher Benson-Manica | last post by:
Why can't I use a class destructor in a using declaration: using MyClass::~MyClass; ? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org ...
17
by: beliavsky | last post by:
Many of my C++ programs have the line using namespace std; but the "Accelerated C++" book of Koenig and Moo has many examples where the library names are included one at a time, for example ...
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
14
by: john.burton.email | last post by:
I've done some extensive searching and can't seem to find an answer to this - Is it correct to using "using" with templates, for example: using std::vector; Or do I need to specify the type...
1
by: louis | last post by:
I've got a new server with Pentium4 xeon processors. I've used sp_who2 for quite a while on my old server -- to look at CPU and IO usage. On the new server, the CPU times are huge -- although...
2
by: EJO | last post by:
Thanks, folks, for taking time to help! In query analyzer and profiler, there seem to be system processes that are generating high cpu time and disk io. Well, I guess the short of it is that I...
3
by: sevenfifteen | last post by:
I've noticed that if I use a statement lik using(StreamWriter sw = new StreamWriter(@"c:\filetowriteto.txt") {... then the file gets released at the end of the using statement block However if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.