4 # Benchmark script for Steve's marc db schema
10 my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'root', 'testpass');
17 for ($i=0; $i<$count; $i++) {
18 ($bibid) || ($bibid=int(rand(79998))+1);
20 ($print) && (print "BIBID: $bibid\n");
21 my $sth=$dbh->prepare("select tagid,tag,subfieldcode,subfieldvalue from marc_2XX_subfield_table where bibid=$bibid order by tagid,subfieldorder");
24 while (my ($tagid,$tag,$subfieldcode,$subfieldvalue) = $sth->fetchrow) {
25 if ($tag ne $lasttag) {
26 ($print) && (print " Tag: $tag\n");
29 ($print) && (print " $subfieldcode $subfieldvalue\n");