Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
a few scripts to compare and benchmark DBIx::Class and DBIx::DataModel
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Comparision of DBIx::Class and DBIx::DataModel

This directory contains a number of scripts that were used to experiment with and benchmark relative performances of DBIx::Class (a.k.a DBIC) and DBIx::DataModel (a.k.a DBIDM). See slides at This talk was for the French Perl Workshop 2012, hence the namespace FPW12 for classes.


README.txt the present file

cpandb.sql copy of a SQLite database generated from CPAN:SQLite

FPW12: classes for accessing the database through DBIC or DBIDM

build_deps: scripts for benchmarking addition of a 'depends' table. Data is in 'deps.tsv', and is built by script '' which extracts dependencies from a local minicpan installation (see CPAN::Mini).

find: example scripts for fetching a single record

search: example scripts for some simple searches

stepwise: example scripts for chained resultsets

find_deps_DBIC: example scripts using DBIC for many-to-many searches

speed: benchmarking various search operations

NOTE : to run benchmarks, redirect STDOUT to a file (i.e. "perl >foo.txt), in order to avoid artificial differences that may be due to the STDOUT console.


Extract & print 2 columns from a single table (109349 rows)

  • raw DBI 0.43 secs
  • DBIC regular 11.09 secs
  • DBIC hashref inflator 10.06 secs
  • DBIC 'raw data' (cursor) 4.48 secs
  • DBIDM regular 4.00 secs
  • DBIDM fast statement 2.25 secs

Join 3 tables & print 4 columns from the join (113895 rows)

  • raw DBI 1.36 secs
  • DBIC regular 46.70 secs
  • DBIC, join & +columns 15.50 secs
  • DBIC, join & +columns, hashref inflator 14.17 secs
  • DBIC, join & +columns, 'raw data' (cursor) 6.59 secs
  • DBIC, prefetch 146.29 secs
  • DBIDM regular 5.01 secs
  • DBIDM fast statement 3.28 secs
Something went wrong with that request. Please try again.