Skip to content

Instantly share code, notes, and snippets.

@arbarlow
Created February 7, 2010 12:01
Show Gist options
  • Save arbarlow/297396 to your computer and use it in GitHub Desktop.
Save arbarlow/297396 to your computer and use it in GitHub Desktop.

PostgreSQL

Import timing..

Starting Import of Artists… 1335.900000 83.280000 1419.180000 (2532.872472) Finished importing Artists with 518928 new records. 0 old or failed attempts It took approximately -42.2145436333333 minutes

Random row finding..

1.870000 0.180000 2.050000 ( 3.104306) 1.870000 0.180000 2.050000 ( 3.017178) 1.870000 0.180000 2.050000 ( 3.007219) 1.870000 0.190000 2.060000 ( 3.002405)

MySQL

Import timing..

Starting Import of Artists… 1157.040000 54.610000 1211.650000 (2522.697625) Finished importing Artists with 518928 new records. 0 old or failed attempts It took approximately -42.0449631333333 minutes

Random row finding..

1.380000 0.120000 1.500000 ( 2.291853) 1.400000 0.120000 1.520000 ( 2.366485) 1.390000 0.120000 1.510000 ( 2.345397) 1.380000 0.110000 1.490000 ( 2.286396)

Info

Finding random rows

fail = 0 puts Benchmark.measure { 5000.times do begin artist = Artist.find rand(518928) rescue ActiveRecord::RecordNotFound fail += 1 end end } puts “Failcount is #{fail}”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment