How to avoid hotspot issues and achieve load balancing? Is hot partition or range an issue in TiDB?

To learn the scenarios that cause hotspots, refer to common hotpots. The following TiDB features are designed to help you solve hotspot issues:

  • The SHARD_ROW_ID_BITS attribute. After setting this attribute, row IDs are scattered and written into multiple Regions, which can alleviate the write hotspot issue.
  • The AUTO_RANDOM attribute, which helps resolve hotspots brought by auto-increment primary keys.
  • Coprocessor Cache, for read hotspots on small tables.
  • Load Base Split, for hotspots caused by unbalanced access between Regions, such as full table scans for small tables.
  • Cached tables, for frequently accessed but rarely updated small hotspot tables.

If you have a performance issue caused by hotspot, refer to Troubleshoot Hotspot Issues to get it resolved.