polardb / polardbx-engine

polardbx-engine is a MySQL branch originated from Alibaba Group, especially supports large-scale distributed database system.
Other
482 stars 125 forks source link

xengine主键range条件查询性能非常差 #28

Open yeqing12 opened 1 year ago

yeqing12 commented 1 year ago

表结构,造100w行数据 CREATE TABLEsbtest1( idint(11) NOT NULL AUTO_INCREMENT, kint(11) NOT NULL DEFAULT '0', cvarchar(4096) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', padchar(60) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', PRIMARY KEY (id), KEYk_1(k) ) ENGINE=XENGINE

简单的查询 1685607317977

1685607414222

同样表结构和数据,换成innodb没有问题

luckywhu commented 1 year ago

如果发现查询性能不符合预期,请检查下参数配置,是否L0/L1层存在层数堆积情况。当层数堆积较多时,lsm-tree的的range查询由于需要做多路归并,性能会受到影响