-2

Our DBA deployed a standalone TiDB and a standalone MySQL to respectively handle about one million tables but it seemed that TiDB could not perform as good as MySQL, why? If it's because the data size is too small, how much data should I put in the database to ensure a better performance in TiDB than MySQL?

Coco
  • 29
  • 4

1 Answers1

3

TiDB is designed for scenarios where sharding is used because the capacity of a MySQL standalone is limited, and where strong consistency and complete distributed transactions are required. One of the advantages of TiDB is pushing down computing to the storage nodes to execute concurrent computing.

TiDB is not suitable for tables of small size (such as below ten million level), because its strength in concurrency cannot be shown with small size data and limited Region. A typical example is the counter table, in which records of a few lines are updated high frequently. In TiDB, these lines become several Key-Value pairs in the storage engine, and then settle into a Region located on a single node. The overhead of background replication to guarantee strong consistency and operations from TiDB to TiKV leads to a poorer performance than a MySQL standalone.

Lilian Lee
  • 190
  • 1
  • 12