Partitioning MYSQL tables

Asked

Viewed 244 times

0

Good night to you all.

I have a question regarding tables in mysql.

Assuming the following scenario.

I have a MYSQL INNODB table with PK ID INT UNSIGNED. ( 4 billion records approx)

1 º If by chance I arrive on record 4.294.967.295,00 will not insert correct?

2 º If I partition this table in MYSQL type Partition Key on for example 200 partitions, the number of records is unlimited ?

type have 4.294.967.295,00 x 200 (partitions) in case can reach up to 858,993,459,000.00 records. It’s this or nothing to see ?

I am afraid to exceed the limit of INT UNSIGNED, and would not like to use BIG INT UNSIGNED or nvarchar.

Thank you!

  • I looked in the documentation but am not sure to answer. In doubt I would use the type of data that fits more data. https://dev.mysql.com/doc/refman/5.7/en/partitioning-limitations-partitioning-keys-unique-keys.html

  • I have no experience with partitioning nor have I ever dealt with such a large table, but in theory BIGINT would support 2 64-1 records. See https://dev.mysql.com/doc/refman/5.7/en/integer-types.html

  • But the performance is compromised with Bigint at the time of making selects with tables with more than 2 million records or 10 million.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.