分布式数据库
CREATE TABLE `A` (
ID
bigint(20) NOT NULL COMMENT '主键 ID',
Column
varchar(256) COMMENT 'A',
PolicyColumn
bigint(20) NOT NULL COMMENT '均衡字段',PRIMARY KEY (`ID`),
KEY
IDX_Column
(`Column
`),) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = ''
假设有如上一张表,主键 ID,业务字段 Column,PolicyColumn,其中 PolicyColumn 为均衡字段也叫做分区字段。索引字段Column
sql1:
select * from A where
Column
=?
sql2:
select * from A where
Column
=? and policyColumn>?
有上述两个 sql,如何评估性能
评论