Quote:
Originally Posted by n_i
This makes even less sense. DB2 cannot scan anything faster than it can read data from disk, and in this case you are at the mercy of some virtual "disk" with unknown parallelism. Disk performance is completely outside the DB2 control, so how do you want to tune something you cannot control? This is exactly why normally you minimize the amount of data you read.
|
Okay I see your point.
I want to get the data from 2 columns i the table. I want to know how much overhead there is when reading a table in db2.
To measure this I use a script that makes a connection to the db and gives me the data form these 2 columns and the same time returns the time consumed. The time is only measured when the query is executed.
As I know, 1 million tuples with a integer and a varchar(20) use approximately 24 Mb of disk space. My disk system can
read (intelligently) 237000 kb/s, so reading 24 Mb will take almost 0.1 second.
When I make the test I have to be sure the cache is empty. So When I execute the transaction I have to do it on a newly started db.
I do this with these commands:
db2stop
exec db2nkill 0
db2start
The command db2stop does not clear the bufferpool entirely, so I have to make the hack with the db2nkill command.
I am now ready to the make the experiment.
have made so far is:
(default settings)
With a COLD BUFFER: 0.18241258 sec.
With a WARM BUFFER: 0.0639812 sec.
With uncommitted read (UR)
With a COLD BUFFER: 0.12914299 sec.
With a WARM BUFFER: 0.06244802 sec.
With UR I have almost reached my goal. With UR I have almost reached my goal of what disk system can perform.
I hope this was more clear to you :-)
/ Jesper