What are the ways to see the data distribution in each TiKV?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 有什么方式可以看到各个tikv里数据分布情况吗

| username: 气死人的萌新

Is there any way to see the data distribution in each TiKV?

| username: h5n1 | Original post link

What specific distribution are you referring to? Check the information in information_schema.tikv_region_status to see if it meets your requirements.

| username: tidb菜鸟一只 | Original post link

These three tables should meet your needs, right?

| username: 裤衩儿飞上天 | Original post link

What does the distribution refer to? The data size of each TiKV node? The number of regions?

| username: 气死人的萌新 | Original post link

Sorry, I didn’t make it clear. I set up a single-node TiDB test. I want to test the performance difference between single-node MySQL and TiDB with 5 million and 10 million records. On one machine, I created one PD, one DB, three KVs, and one Flash for TiDB. From TiDB’s architecture, KV should automatically distribute the data across different KVs for storage, right? However, the current test results show that TiDB’s query speed is slower than MySQL’s, even though both machines have the same configuration. Could it be that the primary key in the table is causing the KV data partitioning to fail, thus not reflecting the architectural advantages?

| username: 裤衩儿飞上天 | Original post link

  1. With your data volume, in terms of architecture, MySQL definitely has the advantage…
  2. Single-point mixed deployment won’t yield much, functional verification is still okay.
  3. For your simple check to see if each TiKV has data,
    1. You can log into the nodes and check if there are SST files in the corresponding data directory.
    2. You can also check the monitoring under PD → Statistics - balance section to get a rough idea of the data distribution.
| username: MrSylar | Original post link

The starting point of TiDB is not to replace MySQL.

| username: zhanggame1 | Original post link

A single-node TiDB is not as good as MySQL; there are network overheads. If you want to test, you can try with one KV.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.