We want to store a very large table in MySQL. The workload's spec is like this:
- Around 1 billion rows.
- Each row has just two fields: a long int as the key and a blob with average size of 20KB as the value.
- High rate of inserts, around 1000 per second and about 40% are updates. Several reads per second.
We have a single server with 2x4-core Xeon CPUs, 80 GB of RAM, and 6x3TB hard disks with RAID-0. What is the best schema design to get the best performance? For examples there are several options:
- Using the long id as the key.
- Adding an auto increment field as the PK and indexing the long id.
- Partitioning the table.
- Choosing the Dynamic row format.
Another single machine and free solutions are also welcome e.g. Postgres. We cannot accept distributed solutions like HBase and Cassandra because we want to spare just a single machine. However, if we can get a solution which needs 3 machines and reaches the same performance and also offers fault tolerance we can accept it too.