Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Latest commit

 

History

History
63 lines (41 loc) · 1.29 KB

README.md

File metadata and controls

63 lines (41 loc) · 1.29 KB

RDS Benchmarks

A set of fairly basic benchmarks (using benchmark-ips) to compare MySQL and PostgreSQL when running on Amazon RDS.

The following tables exist in the test databases:

  • reviews
  • review_comments
  • review_ratings

PostgreSQL had the following amount of rows:

  • reviews: 3959551 rows
  • review_comments: 5002704 rows
  • review_ratings: 14305626 rows

MySQL in turn had the following:

  • reviews: 3959556 rows
  • review_comments: 5002710 rows
  • review_ratings: 14305657 rows

Schemas

The directory schema/ contains the PostgreSQL and MySQL schemas of the various tables, minus the actual data. These schemas have been trimmed as to not contain private or useless information.

Requirements

  • Ruby 2.1 or newer
  • Bundler
  • MySQL development headers (for the mysql2 gem)
  • PostgreSQL development headers (for the pg gem)

Installation

Install the required Gems:

bundle install

Configure PostgreSQL:

export PG_HOST='...'
export PG_DB='...'
export PG_USER='...'
export PG_PASSWORD='...'

Then configure MySQL:

export MYSQL_HOST='...'
export MYSQL_DB='...'
export MYSQL_USER='...'
export MYSQL_PASSWORD='...'

You can now run a benchmark:

ruby benchmark/bench_count_reviews.rb

Reading Material