MySQL performance in a large write-only table

in advance for your answers, and sorry for my poor English, I am not a native speaker.

We are actually developing a mobile game with a backend. In this mobile game we have a monetary system, we track each transaction for verification purposes.

To read the user balance, we have an intermediate table in which the user balance is updated for each transaction, so the transaction table is never read directly by users to reduce the load on large traffic.

The transaction table is uniquely read from time to time in backoffice.

Here is the transaction table diagram:

create table money_money_transaction (
  `id`              BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
  `userID`          INT UNSIGNED NOT NULL,
  `amount`          INT NOT NULL,
  `transactionType` TINYINT NOT NULL,
  `created`         DATETIME NOT NULL,

  CONSTRAINT money_money_transaction_userID FOREIGN KEY (`userID`) REFERENCES `user_user` (`id`)
    ON DELETE CASCADE
);

We planned to have many users, the transaction table can grow to 1 billion rows, so my questions are:

  • ?
  • , MySQL - , ?
  • MySQL ? , id ( ) " " ( 1M-, )
  • , RDS, Aurora , , -master master-slave-. , ?
+4
1

MyRocks (. http://myrocks.io), , INSERT . , MyRocks, , . , , , .

, MySQL - , ?

, MySQL ( , InnoDB) . , . . , . , , . https://dev.mysql.com/doc/refman/5.7/en/innodb-buffer-pool.html.

?

- .

. , , , . "" . . , , .

MySQL ?

MySQL , ( ). , , . . , .

, id ( ) " " ( 1M-, )

. , . , , , FOREIGN KEY, .

, , ( UPDATE DELETE, WHERE). - INSERT, , .

, RDS, Aurora , , -master master-slave-. , ?

Aurora 2017 , . , , - . , Aurora ( 2017) .

+3

Source: https://habr.com/ru/post/1691552/


All Articles