Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 为什么auto_random列不能用作联合索引的第一列呢?

【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】
【Reproduction Path】What operations were performed that caused the issue
【Encountered Issue: Issue Phenomenon and Impact】
【Resource Configuration】
【Attachments: Screenshots / Logs / Monitoring】
The AUTO_INCREMENT column can be used as the first column of a composite index, so it can also be used in partitioned table scenarios.
AUTO_RANDOM cannot be used in partitioned tables due to this limitation.
There shouldn’t be much difference in principle between the two.