Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (26 sloc) 0.815 kb
# Benchmark script for Steve's marc db schema
use DBI;
my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'youruserid', 'yourpassword');
my $count=$ARGV[0];
my $print=$ARGV[1];
my $max=$ARGV[2];
my $bibid=$ARGV[3];
($max) || ($max=79998);
for ($i=0; $i<$count; $i++) {
($bibid) || ($bibid=int(rand($max))+1);
($print) && (print "BIBID: $bibid\n");
my $sth=$dbh->prepare("select tagid,tag,subfieldcode,subfieldvalue from marc_subfield_table where bibid=$bibid order by tagid,subfieldorder");
my $lasttag='';
while (my ($tagid,$tag,$subfieldcode,$subfieldvalue) = $sth->fetchrow) {
if ($tag ne $lasttag) {
($print) && (print " Tag: $tag\n");
($print) && (print " $subfieldcode $subfieldvalue\n");
Jump to Line
Something went wrong with that request. Please try again.