Skip to content
Mysql/Postgres DB performance analysis scripts in Go
Go Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
main.go
makefile
readme.md

readme.md

DB Performance Testing

This tool can be used to benchmark various Database performance under "no-sql" usage conditions.

Build Status

For the full explanation, check https://eadalabs.com/benchmarking-mysql-postgres-and-mongodb-performance-in-nosql-mode/

Database/Table Configuration

The database are used in "no-sql" mode, i.e. without any join between table. The objective of the test is to insert as fast a possible into the table, and read-back as fast as possible.

Two table configuration are defined:

  • light table:

    • First column: index (int, primary key)
    • Second Column: integer
    • Third Column: integer
  • large table:

    • First column: index (int, primary key)
    • Second Column: var char of 200 characters
    • Third to 10th Column: integer

Tests Scenarios

  • Write

    • Insert to a table with 10 concurrent threads without transaction
    • Insert to a table with 10 concurrent insrrt thread using a transaction flushed every minute (only one thread for the transaction flush)
    • Insert to a table with 10 concurrent connections without transaction
  • Read

    • Read the whole table data with one single thread
    • Read the table data with 2 theads: the first threads read the first half of the values, and the second thread reads the second half.

Command Line Usage

  • Mysql

    • make write-innodb
    • make read-innodb
    • make write-myisam
    • make read-myisam
  • Postgress

    • make write-postgres
    • make read-postgres
You can’t perform that action at this time.