Personal DBMS Benchmark

by Philip Greenspun for the Web Tools Review

This is the benchmark I use to figure out if a system can handle access logging into an RDBMS (as opposed to the standard logging into the Unix file system).

The Data Model

create table access_log (
	the_key		char(14),		
	page_id		char(20),
	http_referer	varchar2(150)
);

create index access_log_index on access_log (the_key);
[Note: this is for Oracle. For Illustra, you have to change the data types to TEXT and the syntax of the CREATE INDEX.]

I then use the following perl scripts to generate inserts and updates...

#!/usr/local/bin/perl4

for ($i=1; $i < 10000; $i++ ) {

   print "insert into access_log values ( '$i', 'yada $i','klsdfkjl');\n"

}
which produces a big file full of stuff like
insert into access_log values ( '1', 'yada 1','klsdfkjl');
and
#!/usr/local/bin/perl4

for ($i=1; $i < 10000; $i++ ) {

   print "update access_log set page_id = '$i yowsa' where the_key = '$i';\n";

}
which produces a big file full of stuff like
update access_log set page_id = '1 yowsa' where the_key = '1';
which I then feed to Oracle with a shell command:
time sqlplus username/passwd < update-test.sql > /dev/null

The Results

I've tried this on generic wimpy Unix boxes (SPARC 5 or similar; standard disks; no sysadmin or dbadmin wizardry applied) and found out that
Return to Web Tools Review home


philg@mit.edu

Add a comment | Add a link