Skip to content
zdennis edited this page Sep 14, 2010 · 4 revisions

The below benchmarks were done with MySQL 5.4.12 on Mac OSX 10.5.8, testing against the database engine types for InnoDb and MyISAM. The ActiveRecord model names used were TestInnoDb and TestMyISAM. All times are displayed in seconds.

create in the below benchmarks refers to using ActiveRecord’s standard create method. import refers to using the import method added by activerecord-import.

Benchmarking InnoDb Tables

Creating 1000 records…

create 2.734631
import(column, values) with validations 0.319718 6.6x speedup
import(columns, values) without validations 0.081496 25x speedup
import(models) for 1000 records with validations 0.507533 4x speedup
import(models) without validations 0.099062 20x speedup

Benchmarking MyISAM Tables

Creating 1000 records…

create 2.090427
import(column, values) with validations 0.310144 6.74x speedup
import(columns, values) without validations 0.024607 84.95x speedup
import(models) for 1000 records with validations 0.504962 4.13x speedup
import(models) without validations 0.047668 43.85x speedup
Clone this wiki locally