At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
------------------------------------------------------------
revno: 129
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Wed 2007-07-25 17:26:33 -0700
message:
Added DBD::mysql test to test.pl for comparison.
modified:
perl/test.pl
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-perl5%2ftest.pl
=== modified file 'perl/test.pl'
--- a/perl/test.pl 2007-07-25 17:20:31 +0000
+++ b/perl/test.pl 2007-07-26 00:26:33 +0000
@@ -179,7 +179,27 @@
}
-
my $elapsed = tv_interval ( $before_time );
print "Fetch time for NDBAPI - $num_iter:\t$elapsed\n";
+#Fetch records using DBD::mysql
+
+my $before_time = [gettimeofday];
+
+my $sth = $dbh->prepare("select ATTR2 from mytablename where ATTR1=?");
+
+foreach my $f (0..$num_iter) {
+
+ my $id_num = $ids[rand($INSERT_NUM)];
+
+ $sth->bind_param(1,$id_num);
+ $sth->execute();
+ while ($sth->fetch()) {
+#
+ }
+
+}
+
+my $elapsed = tv_interval ( $before_time );
+print "Fetch time for DBD::mysql - $num_iter:\t$elapsed\n";
+
| Thread |
|---|
| • Rev 129: Added DBD::mysql test to test.pl for comparison. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge | Monty Taylor | 26 Jul |