Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 如何查看tidb三个副本数据分别放在哪些节点
[TiDB Usage Environment] Production Environment
[TiDB Version] V7.1.1
[Reproduction Path] None
[Issue Encountered: How to check which nodes the three TiDB replicas are placed on]
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]
Each node has it, but only the leader will be on one of them. Use SHOW TABLE REGIONS to check.
select REGION_ID, PEER_ID, STORE_ID, IS_LEARNER from INFORMATION_SCHEMA.TIKV_REGION_PEERS where `REGION_ID`=XXXX;
store_id corresponds to the TiKV. You can check the relevant information in the tikv_store_status table or use pd-ctl based on the store_id.
Moderator, this SQL works…
Sure, please provide the Chinese text you need translated into English.
Saved the SQL provided by the new moderator.
If you find the answer helpful, remember to mark it as the best answer 
How to get this regionId?
Generally, it is to look at a specific table, show table xxxx regions.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.