Multi-Primary Key Partitioning

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

Original topic: 多主键分区

| username: TiDBer_sX3j5LdU

[TiDB Usage Environment] / Poc
[TiDB Version] V6.1.3
[Reproduction Path]
CREATE TABLE huatai_order_new66 (
HTSCSecurityID VARCHAR(15) COLLATE utf8_general_ci NOT NULL,
time VARCHAR(31) COLLATE utf8_general_ci NOT NULL,
ApplSeqNum VARCHAR(15) COLLATE utf8_general_ci DEFAULT NULL,
BidExecInstType VARCHAR(15) COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (HTSCSecurityID,time) /*T![clustered_index] NONCLUSTERED */
)
PARTITION BY LIST COLUMNS(HTSCSecurityID) (
PARTITION pRegion_1 VALUES IN(‘000001.SZ’,‘000002.SZ’),
PARTITION pRegion_2 VALUES IN(‘000800.SZ’,‘000801.SZ’),
PARTITION pDefault DEFAULT
);

[Encountered Problem: Problem Phenomenon and Impact]
I would like to ask the experts whether it is feasible to use only one primary key partition in the case of dual primary keys.

| username: 小龙虾爱大龙虾 | Original post link

No, the primary key must include all partition keys.