涉及到分区表的join查询被驱动表不能使用索引吗?

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:5.7.25-TiDB-v4.0.1

  • 【问题描述】:如下面的SQL所示,video表和user表都是分区表,在进行join查询的时候video表可以根据分区和索引条件进行查询,被驱动表现在做的是每个分区都去扫描,为什么被驱动表不能使用索引?而且我这个关联的被驱动表的字段还是主键索引字段,如果使用索引的话应该能够大大加速join查询。另外,我试用了/*+ INL_JOIN(v, u) */ hint 也没有任何效果。

      SELECT
      	`v`.`id`,
      	`u`.`name`
      FROM
      	`video` `v`
      	LEFT JOIN `user` `u` ON v.uid = u.id 
      WHERE
      	((
      			`v`.`date` = '2020-06-15' 
      			) 
      	AND ( `v`.`id` = '68385990400' )) 
      	OR ((
      			`v`.`date` = '2020-05-09' 
      			) 
      		AND (
      		`v`.`id` IN ( '6824665021', '6824665021'))) 
      	OR ((
      			`v`.`date` = '2020-05-17' 
      		) 
      	AND ( `v`.`id` = '6827770050' ));
    

其中video表按照date分区,dateid是主键,user表按照id分区,id是主键。

执行计划截图如下:

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出打印结果,请务必全选并复制粘贴上传。

麻烦上传表结构,多谢。

video 表按照 date 分区, dateid 是主键,其他的就是一些普通字段;
user 表按照 id 分区, id 是主键,其他的也是一些普通字段。

如果觉得原表不方便给出,麻烦给出一个构造的测试表,属性和原表相同,方便我们先测试一下,多谢。

建表语句:

CREATE TABLE `test_video` (
  `date` date NOT NULL COMMENT '日期',
  `id` bigint(20) unsigned NOT NULL COMMENT 'ID',
  `uid` bigint(20) unsigned NOT NULL COMMENT '作者ID',
  `desc` varchar(1024) DEFAULT NULL COMMENT '描述',
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`date`,`id`),
  KEY `inx_uid` (`uid`),
  KEY `inx_updatetime` (`updatetime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='视频表'
PARTITION BY RANGE ( TO_DAYS(`date`) ) (
  PARTITION `p2018` VALUES LESS THAN (737425),
  PARTITION `p201901` VALUES LESS THAN (737456),
  PARTITION `p201902` VALUES LESS THAN (737484),
  PARTITION `p201903` VALUES LESS THAN (737515),
  PARTITION `p201904` VALUES LESS THAN (737545),
  PARTITION `p201905` VALUES LESS THAN (737576),
  PARTITION `p201906` VALUES LESS THAN (737606),
  PARTITION `p201907` VALUES LESS THAN (737637),
  PARTITION `p201908` VALUES LESS THAN (737668),
  PARTITION `p201909` VALUES LESS THAN (737698),
  PARTITION `p201910` VALUES LESS THAN (737729),
  PARTITION `p201911` VALUES LESS THAN (737759),
  PARTITION `p201912` VALUES LESS THAN (737790),
  PARTITION `p202001` VALUES LESS THAN (737821),
  PARTITION `p202002` VALUES LESS THAN (737850),
  PARTITION `p202003` VALUES LESS THAN (737881),
  PARTITION `p202004` VALUES LESS THAN (737911),
  PARTITION `p202005` VALUES LESS THAN (737942),
  PARTITION `p202006` VALUES LESS THAN (737972),
  PARTITION `p202007` VALUES LESS THAN (738003),
  PARTITION `p202008` VALUES LESS THAN (738034),
  PARTITION `p202009` VALUES LESS THAN (738064),
  PARTITION `p202010` VALUES LESS THAN (738095),
  PARTITION `p202011` VALUES LESS THAN (738125),
  PARTITION `p202012` VALUES LESS THAN (738156),
  PARTITION `p202101` VALUES LESS THAN (738187),
  PARTITION `p202102` VALUES LESS THAN (738215),
  PARTITION `p202103` VALUES LESS THAN (738246),
  PARTITION `p202104` VALUES LESS THAN (738276),
  PARTITION `p202105` VALUES LESS THAN (738307),
  PARTITION `p202106` VALUES LESS THAN (738337),
  PARTITION `p202107` VALUES LESS THAN (738368),
  PARTITION `p202108` VALUES LESS THAN (738399),
  PARTITION `p202109` VALUES LESS THAN (738429),
  PARTITION `p202110` VALUES LESS THAN (738460),
  PARTITION `p202111` VALUES LESS THAN (738490),
  PARTITION `p202112` VALUES LESS THAN (738521),
  PARTITION `p202201` VALUES LESS THAN (738552),
  PARTITION `p202202` VALUES LESS THAN (738580),
  PARTITION `p202203` VALUES LESS THAN (738611),
  PARTITION `p202204` VALUES LESS THAN (738641),
  PARTITION `p202205` VALUES LESS THAN (738672),
  PARTITION `p202206` VALUES LESS THAN (738702),
  PARTITION `p202207` VALUES LESS THAN (738733),
  PARTITION `p202208` VALUES LESS THAN (738764),
  PARTITION `p202209` VALUES LESS THAN (738794),
  PARTITION `p202210` VALUES LESS THAN (738825),
  PARTITION `p202211` VALUES LESS THAN (738855),
  PARTITION `p202212` VALUES LESS THAN (738886),
  PARTITION `p202301` VALUES LESS THAN (738917),
  PARTITION `p202302` VALUES LESS THAN (738945),
  PARTITION `p202303` VALUES LESS THAN (738976),
  PARTITION `p202304` VALUES LESS THAN (739006),
  PARTITION `p202305` VALUES LESS THAN (739037),
  PARTITION `p202306` VALUES LESS THAN (739067),
  PARTITION `p202307` VALUES LESS THAN (739098),
  PARTITION `p202308` VALUES LESS THAN (739129),
  PARTITION `p202309` VALUES LESS THAN (739159),
  PARTITION `p202310` VALUES LESS THAN (739190),
  PARTITION `p202311` VALUES LESS THAN (739220),
  PARTITION `p202312` VALUES LESS THAN (739251),
  PARTITION `p299913` VALUES LESS THAN (MAXVALUE)
);


CREATE TABLE `test_user` (
  `id` bigint(20) unsigned NOT NULL COMMENT 'ID',
  `nickname` varchar(255) NOT NULL COMMENT '昵称',
  PRIMARY KEY (`id`),
  KEY `inx_name` (`nickname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户表'
PARTITION BY HASH( `id` )
PARTITIONS 256;

查询语句:

EXPLAIN SELECT
  	`v`.`id`,
  	`u`.`nickname`
  FROM
  	`test_video` `v`
  	LEFT JOIN `test_user` `u` ON v.uid = u.id 
  WHERE
  	((
  			`v`.`date` = '2020-06-15' 
  			) 
  	AND ( `v`.`id` = '68385990400' )) 
  	OR ((
  			`v`.`date` = '2020-05-09' 
  			) 
  		AND (
  		`v`.`id` IN ( '6824665021', '6824665021'))) 
  	OR ((
  			`v`.`date` = '2020-05-17' 
  		) 
  	AND ( `v`.`id` = '6827770050' ));

Explain的执行结果:

|HashJoin_268|7.50|root||left outer join, equal:[eq(mbase.test_video.uid, mbase.test_user.id)]|
|---|---|---|---|---|
|├─Union_269(Build)|6.00|root|||
|│ ├─IndexLookUp_272|3.00|root|||
|│ │ ├─IndexRangeScan_270(Build)|3.00|cop[tikv]|table:v, partition:p202005, index:PRIMARY(date, id)|range:[2020-05-09 6824665021,2020-05-09 6824665021], [2020-05-17 6827770050,2020-05-17 6827770050], [2020-06-15 68385990400,2020-06-15 68385990400], keep order:false, stats:pseudo|
|│ │ └─TableRowIDScan_271(Probe)|3.00|cop[tikv]|table:v, partition:p202005|keep order:false, stats:pseudo|
|│ └─IndexLookUp_275|3.00|root|||
|│   ├─IndexRangeScan_273(Build)|3.00|cop[tikv]|table:v, partition:p202006, index:PRIMARY(date, id)|range:[2020-05-09 6824665021,2020-05-09 6824665021], [2020-05-17 6827770050,2020-05-17 6827770050], [2020-06-15 68385990400,2020-06-15 68385990400], keep order:false, stats:pseudo|
|│   └─TableRowIDScan_274(Probe)|3.00|cop[tikv]|table:v, partition:p202006|keep order:false, stats:pseudo|
|└─Union_276(Probe)|2560000.00|root|||
|  ├─TableReader_278|10000.00|root||data:TableFullScan_277|
|  │ └─TableFullScan_277|10000.00|cop[tikv]|table:u, partition:p0|keep order:false, stats:pseudo|
|  ├─TableReader_280|10000.00|root||data:TableFullScan_279|
|  │ └─TableFullScan_279|10000.00|cop[tikv]|table:u, partition:p1|keep order:false, stats:pseudo|
|  ├─TableReader_282|10000.00|root||data:TableFullScan_281|
|  │ └─TableFullScan_281|10000.00|cop[tikv]|table:u, partition:p2|keep order:false, stats:pseudo|
|  ├─TableReader_284|10000.00|root||data:TableFullScan_283|
|  │ └─TableFullScan_283|10000.00|cop[tikv]|table:u, partition:p3|keep order:false, stats:pseudo|
|  ├─TableReader_286|10000.00|root||data:TableFullScan_285|
|  │ └─TableFullScan_285|10000.00|cop[tikv]|table:u, partition:p4|keep order:false, stats:pseudo|
|  ├─TableReader_288|10000.00|root||data:TableFullScan_287|
|  │ └─TableFullScan_287|10000.00|cop[tikv]|table:u, partition:p5|keep order:false, stats:pseudo|
|  ├─TableReader_290|10000.00|root||data:TableFullScan_289|
|  │ └─TableFullScan_289|10000.00|cop[tikv]|table:u, partition:p6|keep order:false, stats:pseudo|
|  ├─TableReader_292|10000.00|root||data:TableFullScan_291|
|  │ └─TableFullScan_291|10000.00|cop[tikv]|table:u, partition:p7|keep order:false, stats:pseudo|
|  ├─TableReader_294|10000.00|root||data:TableFullScan_293|
|  │ └─TableFullScan_293|10000.00|cop[tikv]|table:u, partition:p8|keep order:false, stats:pseudo|
|  ├─TableReader_296|10000.00|root||data:TableFullScan_295|
|  │ └─TableFullScan_295|10000.00|cop[tikv]|table:u, partition:p9|keep order:false, stats:pseudo|
|  ├─TableReader_298|10000.00|root||data:TableFullScan_297|
|  │ └─TableFullScan_297|10000.00|cop[tikv]|table:u, partition:p10|keep order:false, stats:pseudo|
|  ├─TableReader_300|10000.00|root||data:TableFullScan_299|
|  │ └─TableFullScan_299|10000.00|cop[tikv]|table:u, partition:p11|keep order:false, stats:pseudo|
|  ├─TableReader_302|10000.00|root||data:TableFullScan_301|
|  │ └─TableFullScan_301|10000.00|cop[tikv]|table:u, partition:p12|keep order:false, stats:pseudo|
|  ├─TableReader_304|10000.00|root||data:TableFullScan_303|
|  │ └─TableFullScan_303|10000.00|cop[tikv]|table:u, partition:p13|keep order:false, stats:pseudo|
|  ├─TableReader_306|10000.00|root||data:TableFullScan_305|
|  │ └─TableFullScan_305|10000.00|cop[tikv]|table:u, partition:p14|keep order:false, stats:pseudo|
|  ├─TableReader_308|10000.00|root||data:TableFullScan_307|
|  │ └─TableFullScan_307|10000.00|cop[tikv]|table:u, partition:p15|keep order:false, stats:pseudo|
|  ├─TableReader_310|10000.00|root||data:TableFullScan_309|
|  │ └─TableFullScan_309|10000.00|cop[tikv]|table:u, partition:p16|keep order:false, stats:pseudo|
|  ├─TableReader_312|10000.00|root||data:TableFullScan_311|
|  │ └─TableFullScan_311|10000.00|cop[tikv]|table:u, partition:p17|keep order:false, stats:pseudo|
|  ├─TableReader_314|10000.00|root||data:TableFullScan_313|
|  │ └─TableFullScan_313|10000.00|cop[tikv]|table:u, partition:p18|keep order:false, stats:pseudo|
|  ├─TableReader_316|10000.00|root||data:TableFullScan_315|
|  │ └─TableFullScan_315|10000.00|cop[tikv]|table:u, partition:p19|keep order:false, stats:pseudo|
|  ├─TableReader_318|10000.00|root||data:TableFullScan_317|
|  │ └─TableFullScan_317|10000.00|cop[tikv]|table:u, partition:p20|keep order:false, stats:pseudo|
|  ├─TableReader_320|10000.00|root||data:TableFullScan_319|
|  │ └─TableFullScan_319|10000.00|cop[tikv]|table:u, partition:p21|keep order:false, stats:pseudo|
|  ├─TableReader_322|10000.00|root||data:TableFullScan_321|
|  │ └─TableFullScan_321|10000.00|cop[tikv]|table:u, partition:p22|keep order:false, stats:pseudo|
|  ├─TableReader_324|10000.00|root||data:TableFullScan_323|
|  │ └─TableFullScan_323|10000.00|cop[tikv]|table:u, partition:p23|keep order:false, stats:pseudo|
|  ├─TableReader_326|10000.00|root||data:TableFullScan_325|
|  │ └─TableFullScan_325|10000.00|cop[tikv]|table:u, partition:p24|keep order:false, stats:pseudo|
|  ├─TableReader_328|10000.00|root||data:TableFullScan_327|
|  │ └─TableFullScan_327|10000.00|cop[tikv]|table:u, partition:p25|keep order:false, stats:pseudo|
|  ├─TableReader_330|10000.00|root||data:TableFullScan_329|
|  │ └─TableFullScan_329|10000.00|cop[tikv]|table:u, partition:p26|keep order:false, stats:pseudo|
|  ├─TableReader_332|10000.00|root||data:TableFullScan_331|
|  │ └─TableFullScan_331|10000.00|cop[tikv]|table:u, partition:p27|keep order:false, stats:pseudo|
|  ├─TableReader_334|10000.00|root||data:TableFullScan_333|
|  │ └─TableFullScan_333|10000.00|cop[tikv]|table:u, partition:p28|keep order:false, stats:pseudo|
|  ├─TableReader_336|10000.00|root||data:TableFullScan_335|
|  │ └─TableFullScan_335|10000.00|cop[tikv]|table:u, partition:p29|keep order:false, stats:pseudo|
|  ├─TableReader_338|10000.00|root||data:TableFullScan_337|
|  │ └─TableFullScan_337|10000.00|cop[tikv]|table:u, partition:p30|keep order:false, stats:pseudo|
|  ├─TableReader_340|10000.00|root||data:TableFullScan_339|
|  │ └─TableFullScan_339|10000.00|cop[tikv]|table:u, partition:p31|keep order:false, stats:pseudo|
|  ├─TableReader_342|10000.00|root||data:TableFullScan_341|
|  │ └─TableFullScan_341|10000.00|cop[tikv]|table:u, partition:p32|keep order:false, stats:pseudo|
|  ├─TableReader_344|10000.00|root||data:TableFullScan_343|
|  │ └─TableFullScan_343|10000.00|cop[tikv]|table:u, partition:p33|keep order:false, stats:pseudo|
|  ├─TableReader_346|10000.00|root||data:TableFullScan_345|
|  │ └─TableFullScan_345|10000.00|cop[tikv]|table:u, partition:p34|keep order:false, stats:pseudo|
|  ├─TableReader_348|10000.00|root||data:TableFullScan_347|
|  │ └─TableFullScan_347|10000.00|cop[tikv]|table:u, partition:p35|keep order:false, stats:pseudo|
|  ├─TableReader_350|10000.00|root||data:TableFullScan_349|
|  │ └─TableFullScan_349|10000.00|cop[tikv]|table:u, partition:p36|keep order:false, stats:pseudo|
|  ├─TableReader_352|10000.00|root||data:TableFullScan_351|
|  │ └─TableFullScan_351|10000.00|cop[tikv]|table:u, partition:p37|keep order:false, stats:pseudo|
|  ├─TableReader_354|10000.00|root||data:TableFullScan_353|
|  │ └─TableFullScan_353|10000.00|cop[tikv]|table:u, partition:p38|keep order:false, stats:pseudo|
|  ├─TableReader_356|10000.00|root||data:TableFullScan_355|
|  │ └─TableFullScan_355|10000.00|cop[tikv]|table:u, partition:p39|keep order:false, stats:pseudo|
|  ├─TableReader_358|10000.00|root||data:TableFullScan_357|
|  │ └─TableFullScan_357|10000.00|cop[tikv]|table:u, partition:p40|keep order:false, stats:pseudo|
|  ├─TableReader_360|10000.00|root||data:TableFullScan_359|
|  │ └─TableFullScan_359|10000.00|cop[tikv]|table:u, partition:p41|keep order:false, stats:pseudo|
|  ├─TableReader_362|10000.00|root||data:TableFullScan_361|
|  │ └─TableFullScan_361|10000.00|cop[tikv]|table:u, partition:p42|keep order:false, stats:pseudo|
|  ├─TableReader_364|10000.00|root||data:TableFullScan_363|
|  │ └─TableFullScan_363|10000.00|cop[tikv]|table:u, partition:p43|keep order:false, stats:pseudo|
|  ├─TableReader_366|10000.00|root||data:TableFullScan_365|
|  │ └─TableFullScan_365|10000.00|cop[tikv]|table:u, partition:p44|keep order:false, stats:pseudo|
|  ├─TableReader_368|10000.00|root||data:TableFullScan_367|
|  │ └─TableFullScan_367|10000.00|cop[tikv]|table:u, partition:p45|keep order:false, stats:pseudo|
|  ├─TableReader_370|10000.00|root||data:TableFullScan_369|
|  │ └─TableFullScan_369|10000.00|cop[tikv]|table:u, partition:p46|keep order:false, stats:pseudo|
|  ├─TableReader_372|10000.00|root||data:TableFullScan_371|
|  │ └─TableFullScan_371|10000.00|cop[tikv]|table:u, partition:p47|keep order:false, stats:pseudo|
|  ├─TableReader_374|10000.00|root||data:TableFullScan_373|
|  │ └─TableFullScan_373|10000.00|cop[tikv]|table:u, partition:p48|keep order:false, stats:pseudo|
|  ├─TableReader_376|10000.00|root||data:TableFullScan_375|
|  │ └─TableFullScan_375|10000.00|cop[tikv]|table:u, partition:p49|keep order:false, stats:pseudo|
|  ├─TableReader_378|10000.00|root||data:TableFullScan_377|
|  │ └─TableFullScan_377|10000.00|cop[tikv]|table:u, partition:p50|keep order:false, stats:pseudo|
|  ├─TableReader_380|10000.00|root||data:TableFullScan_379|
|  │ └─TableFullScan_379|10000.00|cop[tikv]|table:u, partition:p51|keep order:false, stats:pseudo|
|  ├─TableReader_382|10000.00|root||data:TableFullScan_381|
|  │ └─TableFullScan_381|10000.00|cop[tikv]|table:u, partition:p52|keep order:false, stats:pseudo|
|  ├─TableReader_384|10000.00|root||data:TableFullScan_383|
|  │ └─TableFullScan_383|10000.00|cop[tikv]|table:u, partition:p53|keep order:false, stats:pseudo|
|  ├─TableReader_386|10000.00|root||data:TableFullScan_385|
|  │ └─TableFullScan_385|10000.00|cop[tikv]|table:u, partition:p54|keep order:false, stats:pseudo|
|  ├─TableReader_388|10000.00|root||data:TableFullScan_387|
|  │ └─TableFullScan_387|10000.00|cop[tikv]|table:u, partition:p55|keep order:false, stats:pseudo|
|  ├─TableReader_390|10000.00|root||data:TableFullScan_389|
|  │ └─TableFullScan_389|10000.00|cop[tikv]|table:u, partition:p56|keep order:false, stats:pseudo|
|  ├─TableReader_392|10000.00|root||data:TableFullScan_391|
|  │ └─TableFullScan_391|10000.00|cop[tikv]|table:u, partition:p57|keep order:false, stats:pseudo|
|  ├─TableReader_394|10000.00|root||data:TableFullScan_393|
|  │ └─TableFullScan_393|10000.00|cop[tikv]|table:u, partition:p58|keep order:false, stats:pseudo|
|  ├─TableReader_396|10000.00|root||data:TableFullScan_395|
|  │ └─TableFullScan_395|10000.00|cop[tikv]|table:u, partition:p59|keep order:false, stats:pseudo|
|  ├─TableReader_398|10000.00|root||data:TableFullScan_397|
|  │ └─TableFullScan_397|10000.00|cop[tikv]|table:u, partition:p60|keep order:false, stats:pseudo|
|  ├─TableReader_400|10000.00|root||data:TableFullScan_399|
|  │ └─TableFullScan_399|10000.00|cop[tikv]|table:u, partition:p61|keep order:false, stats:pseudo|
|  ├─TableReader_402|10000.00|root||data:TableFullScan_401|
|  │ └─TableFullScan_401|10000.00|cop[tikv]|table:u, partition:p62|keep order:false, stats:pseudo|
|  ├─TableReader_404|10000.00|root||data:TableFullScan_403|
|  │ └─TableFullScan_403|10000.00|cop[tikv]|table:u, partition:p63|keep order:false, stats:pseudo|
|  ├─TableReader_406|10000.00|root||data:TableFullScan_405|
|  │ └─TableFullScan_405|10000.00|cop[tikv]|table:u, partition:p64|keep order:false, stats:pseudo|
|  ├─TableReader_408|10000.00|root||data:TableFullScan_407|
|  │ └─TableFullScan_407|10000.00|cop[tikv]|table:u, partition:p65|keep order:false, stats:pseudo|
|  ├─TableReader_410|10000.00|root||data:TableFullScan_409|
|  │ └─TableFullScan_409|10000.00|cop[tikv]|table:u, partition:p66|keep order:false, stats:pseudo|
|  ├─TableReader_412|10000.00|root||data:TableFullScan_411|
|  │ └─TableFullScan_411|10000.00|cop[tikv]|table:u, partition:p67|keep order:false, stats:pseudo|
|  ├─TableReader_414|10000.00|root||data:TableFullScan_413|
|  │ └─TableFullScan_413|10000.00|cop[tikv]|table:u, partition:p68|keep order:false, stats:pseudo|
|  ├─TableReader_416|10000.00|root||data:TableFullScan_415|
|  │ └─TableFullScan_415|10000.00|cop[tikv]|table:u, partition:p69|keep order:false, stats:pseudo|
|  ├─TableReader_418|10000.00|root||data:TableFullScan_417|
|  │ └─TableFullScan_417|10000.00|cop[tikv]|table:u, partition:p70|keep order:false, stats:pseudo|
|  ├─TableReader_420|10000.00|root||data:TableFullScan_419|
|  │ └─TableFullScan_419|10000.00|cop[tikv]|table:u, partition:p71|keep order:false, stats:pseudo|
|  ├─TableReader_422|10000.00|root||data:TableFullScan_421|
|  │ └─TableFullScan_421|10000.00|cop[tikv]|table:u, partition:p72|keep order:false, stats:pseudo|
|  ├─TableReader_424|10000.00|root||data:TableFullScan_423|
|  │ └─TableFullScan_423|10000.00|cop[tikv]|table:u, partition:p73|keep order:false, stats:pseudo|
|  ├─TableReader_426|10000.00|root||data:TableFullScan_425|
|  │ └─TableFullScan_425|10000.00|cop[tikv]|table:u, partition:p74|keep order:false, stats:pseudo|
|  ├─TableReader_428|10000.00|root||data:TableFullScan_427|
|  │ └─TableFullScan_427|10000.00|cop[tikv]|table:u, partition:p75|keep order:false, stats:pseudo|
|  ├─TableReader_430|10000.00|root||data:TableFullScan_429|
|  │ └─TableFullScan_429|10000.00|cop[tikv]|table:u, partition:p76|keep order:false, stats:pseudo|
|  ├─TableReader_432|10000.00|root||data:TableFullScan_431|
|  │ └─TableFullScan_431|10000.00|cop[tikv]|table:u, partition:p77|keep order:false, stats:pseudo|
|  ├─TableReader_434|10000.00|root||data:TableFullScan_433|
|  │ └─TableFullScan_433|10000.00|cop[tikv]|table:u, partition:p78|keep order:false, stats:pseudo|
|  ├─TableReader_436|10000.00|root||data:TableFullScan_435|
|  │ └─TableFullScan_435|10000.00|cop[tikv]|table:u, partition:p79|keep order:false, stats:pseudo|
|  ├─TableReader_438|10000.00|root||data:TableFullScan_437|
|  │ └─TableFullScan_437|10000.00|cop[tikv]|table:u, partition:p80|keep order:false, stats:pseudo|
|  ├─TableReader_440|10000.00|root||data:TableFullScan_439|
|  │ └─TableFullScan_439|10000.00|cop[tikv]|table:u, partition:p81|keep order:false, stats:pseudo|
|  ├─TableReader_442|10000.00|root||data:TableFullScan_441|
|  │ └─TableFullScan_441|10000.00|cop[tikv]|table:u, partition:p82|keep order:false, stats:pseudo|
|  ├─TableReader_444|10000.00|root||data:TableFullScan_443|
|  │ └─TableFullScan_443|10000.00|cop[tikv]|table:u, partition:p83|keep order:false, stats:pseudo|
|  ├─TableReader_446|10000.00|root||data:TableFullScan_445|
|  │ └─TableFullScan_445|10000.00|cop[tikv]|table:u, partition:p84|keep order:false, stats:pseudo|
|  ├─TableReader_448|10000.00|root||data:TableFullScan_447|
|  │ └─TableFullScan_447|10000.00|cop[tikv]|table:u, partition:p85|keep order:false, stats:pseudo|
|  ├─TableReader_450|10000.00|root||data:TableFullScan_449|
|  │ └─TableFullScan_449|10000.00|cop[tikv]|table:u, partition:p86|keep order:false, stats:pseudo|
|  ├─TableReader_452|10000.00|root||data:TableFullScan_451|
|  │ └─TableFullScan_451|10000.00|cop[tikv]|table:u, partition:p87|keep order:false, stats:pseudo|
|  ├─TableReader_454|10000.00|root||data:TableFullScan_453|
|  │ └─TableFullScan_453|10000.00|cop[tikv]|table:u, partition:p88|keep order:false, stats:pseudo|
|  ├─TableReader_456|10000.00|root||data:TableFullScan_455|
|  │ └─TableFullScan_455|10000.00|cop[tikv]|table:u, partition:p89|keep order:false, stats:pseudo|
|  ├─TableReader_458|10000.00|root||data:TableFullScan_457|
|  │ └─TableFullScan_457|10000.00|cop[tikv]|table:u, partition:p90|keep order:false, stats:pseudo|
|  ├─TableReader_460|10000.00|root||data:TableFullScan_459|
|  │ └─TableFullScan_459|10000.00|cop[tikv]|table:u, partition:p91|keep order:false, stats:pseudo|
|  ├─TableReader_462|10000.00|root||data:TableFullScan_461|
|  │ └─TableFullScan_461|10000.00|cop[tikv]|table:u, partition:p92|keep order:false, stats:pseudo|
|  ├─TableReader_464|10000.00|root||data:TableFullScan_463|
|  │ └─TableFullScan_463|10000.00|cop[tikv]|table:u, partition:p93|keep order:false, stats:pseudo|
|  ├─TableReader_466|10000.00|root||data:TableFullScan_465|
|  │ └─TableFullScan_465|10000.00|cop[tikv]|table:u, partition:p94|keep order:false, stats:pseudo|
|  ├─TableReader_468|10000.00|root||data:TableFullScan_467|
|  │ └─TableFullScan_467|10000.00|cop[tikv]|table:u, partition:p95|keep order:false, stats:pseudo|
|  ├─TableReader_470|10000.00|root||data:TableFullScan_469|
|  │ └─TableFullScan_469|10000.00|cop[tikv]|table:u, partition:p96|keep order:false, stats:pseudo|
|  ├─TableReader_472|10000.00|root||data:TableFullScan_471|
|  │ └─TableFullScan_471|10000.00|cop[tikv]|table:u, partition:p97|keep order:false, stats:pseudo|
|  ├─TableReader_474|10000.00|root||data:TableFullScan_473|
|  │ └─TableFullScan_473|10000.00|cop[tikv]|table:u, partition:p98|keep order:false, stats:pseudo|
|  ├─TableReader_476|10000.00|root||data:TableFullScan_475|
|  │ └─TableFullScan_475|10000.00|cop[tikv]|table:u, partition:p99|keep order:false, stats:pseudo|
|  ├─TableReader_478|10000.00|root||data:TableFullScan_477|
|  │ └─TableFullScan_477|10000.00|cop[tikv]|table:u, partition:p100|keep order:false, stats:pseudo|
|  ├─TableReader_480|10000.00|root||data:TableFullScan_479|
|  │ └─TableFullScan_479|10000.00|cop[tikv]|table:u, partition:p101|keep order:false, stats:pseudo|
|  ├─TableReader_482|10000.00|root||data:TableFullScan_481|
|  │ └─TableFullScan_481|10000.00|cop[tikv]|table:u, partition:p102|keep order:false, stats:pseudo|
|  ├─TableReader_484|10000.00|root||data:TableFullScan_483|
|  │ └─TableFullScan_483|10000.00|cop[tikv]|table:u, partition:p103|keep order:false, stats:pseudo|
|  ├─TableReader_486|10000.00|root||data:TableFullScan_485|
|  │ └─TableFullScan_485|10000.00|cop[tikv]|table:u, partition:p104|keep order:false, stats:pseudo|
|  ├─TableReader_488|10000.00|root||data:TableFullScan_487|
|  │ └─TableFullScan_487|10000.00|cop[tikv]|table:u, partition:p105|keep order:false, stats:pseudo|
|  ├─TableReader_490|10000.00|root||data:TableFullScan_489|
|  │ └─TableFullScan_489|10000.00|cop[tikv]|table:u, partition:p106|keep order:false, stats:pseudo|
|  ├─TableReader_492|10000.00|root||data:TableFullScan_491|
|  │ └─TableFullScan_491|10000.00|cop[tikv]|table:u, partition:p107|keep order:false, stats:pseudo|
|  ├─TableReader_494|10000.00|root||data:TableFullScan_493|
|  │ └─TableFullScan_493|10000.00|cop[tikv]|table:u, partition:p108|keep order:false, stats:pseudo|
|  ├─TableReader_496|10000.00|root||data:TableFullScan_495|
|  │ └─TableFullScan_495|10000.00|cop[tikv]|table:u, partition:p109|keep order:false, stats:pseudo|
|  ├─TableReader_498|10000.00|root||data:TableFullScan_497|
|  │ └─TableFullScan_497|10000.00|cop[tikv]|table:u, partition:p110|keep order:false, stats:pseudo|
|  ├─TableReader_500|10000.00|root||data:TableFullScan_499|
|  │ └─TableFullScan_499|10000.00|cop[tikv]|table:u, partition:p111|keep order:false, stats:pseudo|
|  ├─TableReader_502|10000.00|root||data:TableFullScan_501|
|  │ └─TableFullScan_501|10000.00|cop[tikv]|table:u, partition:p112|keep order:false, stats:pseudo|
|  ├─TableReader_504|10000.00|root||data:TableFullScan_503|
|  │ └─TableFullScan_503|10000.00|cop[tikv]|table:u, partition:p113|keep order:false, stats:pseudo|
|  ├─TableReader_506|10000.00|root||data:TableFullScan_505|
|  │ └─TableFullScan_505|10000.00|cop[tikv]|table:u, partition:p114|keep order:false, stats:pseudo|
|  ├─TableReader_508|10000.00|root||data:TableFullScan_507|
|  │ └─TableFullScan_507|10000.00|cop[tikv]|table:u, partition:p115|keep order:false, stats:pseudo|
|  ├─TableReader_510|10000.00|root||data:TableFullScan_509|
|  │ └─TableFullScan_509|10000.00|cop[tikv]|table:u, partition:p116|keep order:false, stats:pseudo|
|  ├─TableReader_512|10000.00|root||data:TableFullScan_511|
|  │ └─TableFullScan_511|10000.00|cop[tikv]|table:u, partition:p117|keep order:false, stats:pseudo|
|  ├─TableReader_514|10000.00|root||data:TableFullScan_513|
|  │ └─TableFullScan_513|10000.00|cop[tikv]|table:u, partition:p118|keep order:false, stats:pseudo|
|  ├─TableReader_516|10000.00|root||data:TableFullScan_515|
|  │ └─TableFullScan_515|10000.00|cop[tikv]|table:u, partition:p119|keep order:false, stats:pseudo|
|  ├─TableReader_518|10000.00|root||data:TableFullScan_517|
|  │ └─TableFullScan_517|10000.00|cop[tikv]|table:u, partition:p120|keep order:false, stats:pseudo|
|  ├─TableReader_520|10000.00|root||data:TableFullScan_519|
|  │ └─TableFullScan_519|10000.00|cop[tikv]|table:u, partition:p121|keep order:false, stats:pseudo|
|  ├─TableReader_522|10000.00|root||data:TableFullScan_521|
|  │ └─TableFullScan_521|10000.00|cop[tikv]|table:u, partition:p122|keep order:false, stats:pseudo|
|  ├─TableReader_524|10000.00|root||data:TableFullScan_523|
|  │ └─TableFullScan_523|10000.00|cop[tikv]|table:u, partition:p123|keep order:false, stats:pseudo|
|  ├─TableReader_526|10000.00|root||data:TableFullScan_525|
|  │ └─TableFullScan_525|10000.00|cop[tikv]|table:u, partition:p124|keep order:false, stats:pseudo|
|  ├─TableReader_528|10000.00|root||data:TableFullScan_527|
|  │ └─TableFullScan_527|10000.00|cop[tikv]|table:u, partition:p125|keep order:false, stats:pseudo|
|  ├─TableReader_530|10000.00|root||data:TableFullScan_529|
|  │ └─TableFullScan_529|10000.00|cop[tikv]|table:u, partition:p126|keep order:false, stats:pseudo|
|  ├─TableReader_532|10000.00|root||data:TableFullScan_531|
|  │ └─TableFullScan_531|10000.00|cop[tikv]|table:u, partition:p127|keep order:false, stats:pseudo|
|  ├─TableReader_534|10000.00|root||data:TableFullScan_533|
|  │ └─TableFullScan_533|10000.00|cop[tikv]|table:u, partition:p128|keep order:false, stats:pseudo|
|  ├─TableReader_536|10000.00|root||data:TableFullScan_535|
|  │ └─TableFullScan_535|10000.00|cop[tikv]|table:u, partition:p129|keep order:false, stats:pseudo|
|  ├─TableReader_538|10000.00|root||data:TableFullScan_537|
|  │ └─TableFullScan_537|10000.00|cop[tikv]|table:u, partition:p130|keep order:false, stats:pseudo|
|  ├─TableReader_540|10000.00|root||data:TableFullScan_539|
|  │ └─TableFullScan_539|10000.00|cop[tikv]|table:u, partition:p131|keep order:false, stats:pseudo|
|  ├─TableReader_542|10000.00|root||data:TableFullScan_541|
|  │ └─TableFullScan_541|10000.00|cop[tikv]|table:u, partition:p132|keep order:false, stats:pseudo|
|  ├─TableReader_544|10000.00|root||data:TableFullScan_543|
|  │ └─TableFullScan_543|10000.00|cop[tikv]|table:u, partition:p133|keep order:false, stats:pseudo|
|  ├─TableReader_546|10000.00|root||data:TableFullScan_545|
|  │ └─TableFullScan_545|10000.00|cop[tikv]|table:u, partition:p134|keep order:false, stats:pseudo|
|  ├─TableReader_548|10000.00|root||data:TableFullScan_547|
|  │ └─TableFullScan_547|10000.00|cop[tikv]|table:u, partition:p135|keep order:false, stats:pseudo|
|  ├─TableReader_550|10000.00|root||data:TableFullScan_549|
|  │ └─TableFullScan_549|10000.00|cop[tikv]|table:u, partition:p136|keep order:false, stats:pseudo|
|  ├─TableReader_552|10000.00|root||data:TableFullScan_551|
|  │ └─TableFullScan_551|10000.00|cop[tikv]|table:u, partition:p137|keep order:false, stats:pseudo|
|  ├─TableReader_554|10000.00|root||data:TableFullScan_553|
|  │ └─TableFullScan_553|10000.00|cop[tikv]|table:u, partition:p138|keep order:false, stats:pseudo|
|  ├─TableReader_556|10000.00|root||data:TableFullScan_555|
|  │ └─TableFullScan_555|10000.00|cop[tikv]|table:u, partition:p139|keep order:false, stats:pseudo|
|  ├─TableReader_558|10000.00|root||data:TableFullScan_557|
|  │ └─TableFullScan_557|10000.00|cop[tikv]|table:u, partition:p140|keep order:false, stats:pseudo|
|  ├─TableReader_560|10000.00|root||data:TableFullScan_559|
|  │ └─TableFullScan_559|10000.00|cop[tikv]|table:u, partition:p141|keep order:false, stats:pseudo|
|  ├─TableReader_562|10000.00|root||data:TableFullScan_561|
|  │ └─TableFullScan_561|10000.00|cop[tikv]|table:u, partition:p142|keep order:false, stats:pseudo|
|  ├─TableReader_564|10000.00|root||data:TableFullScan_563|
|  │ └─TableFullScan_563|10000.00|cop[tikv]|table:u, partition:p143|keep order:false, stats:pseudo|
|  ├─TableReader_566|10000.00|root||data:TableFullScan_565|
|  │ └─TableFullScan_565|10000.00|cop[tikv]|table:u, partition:p144|keep order:false, stats:pseudo|
|  ├─TableReader_568|10000.00|root||data:TableFullScan_567|
|  │ └─TableFullScan_567|10000.00|cop[tikv]|table:u, partition:p145|keep order:false, stats:pseudo|
|  ├─TableReader_570|10000.00|root||data:TableFullScan_569|
|  │ └─TableFullScan_569|10000.00|cop[tikv]|table:u, partition:p146|keep order:false, stats:pseudo|
|  ├─TableReader_572|10000.00|root||data:TableFullScan_571|
|  │ └─TableFullScan_571|10000.00|cop[tikv]|table:u, partition:p147|keep order:false, stats:pseudo|
|  ├─TableReader_574|10000.00|root||data:TableFullScan_573|
|  │ └─TableFullScan_573|10000.00|cop[tikv]|table:u, partition:p148|keep order:false, stats:pseudo|
|  ├─TableReader_576|10000.00|root||data:TableFullScan_575|
|  │ └─TableFullScan_575|10000.00|cop[tikv]|table:u, partition:p149|keep order:false, stats:pseudo|
|  ├─TableReader_578|10000.00|root||data:TableFullScan_577|
|  │ └─TableFullScan_577|10000.00|cop[tikv]|table:u, partition:p150|keep order:false, stats:pseudo|
|  ├─TableReader_580|10000.00|root||data:TableFullScan_579|
|  │ └─TableFullScan_579|10000.00|cop[tikv]|table:u, partition:p151|keep order:false, stats:pseudo|
|  ├─TableReader_582|10000.00|root||data:TableFullScan_581|
|  │ └─TableFullScan_581|10000.00|cop[tikv]|table:u, partition:p152|keep order:false, stats:pseudo|
|  ├─TableReader_584|10000.00|root||data:TableFullScan_583|
|  │ └─TableFullScan_583|10000.00|cop[tikv]|table:u, partition:p153|keep order:false, stats:pseudo|
|  ├─TableReader_586|10000.00|root||data:TableFullScan_585|
|  │ └─TableFullScan_585|10000.00|cop[tikv]|table:u, partition:p154|keep order:false, stats:pseudo|
|  ├─TableReader_588|10000.00|root||data:TableFullScan_587|
|  │ └─TableFullScan_587|10000.00|cop[tikv]|table:u, partition:p155|keep order:false, stats:pseudo|
|  ├─TableReader_590|10000.00|root||data:TableFullScan_589|
|  │ └─TableFullScan_589|10000.00|cop[tikv]|table:u, partition:p156|keep order:false, stats:pseudo|
|  ├─TableReader_592|10000.00|root||data:TableFullScan_591|
|  │ └─TableFullScan_591|10000.00|cop[tikv]|table:u, partition:p157|keep order:false, stats:pseudo|
|  ├─TableReader_594|10000.00|root||data:TableFullScan_593|
|  │ └─TableFullScan_593|10000.00|cop[tikv]|table:u, partition:p158|keep order:false, stats:pseudo|
|  ├─TableReader_596|10000.00|root||data:TableFullScan_595|
|  │ └─TableFullScan_595|10000.00|cop[tikv]|table:u, partition:p159|keep order:false, stats:pseudo|
|  ├─TableReader_598|10000.00|root||data:TableFullScan_597|
|  │ └─TableFullScan_597|10000.00|cop[tikv]|table:u, partition:p160|keep order:false, stats:pseudo|
|  ├─TableReader_600|10000.00|root||data:TableFullScan_599|
|  │ └─TableFullScan_599|10000.00|cop[tikv]|table:u, partition:p161|keep order:false, stats:pseudo|
|  ├─TableReader_602|10000.00|root||data:TableFullScan_601|
|  │ └─TableFullScan_601|10000.00|cop[tikv]|table:u, partition:p162|keep order:false, stats:pseudo|
|  ├─TableReader_604|10000.00|root||data:TableFullScan_603|
|  │ └─TableFullScan_603|10000.00|cop[tikv]|table:u, partition:p163|keep order:false, stats:pseudo|
|  ├─TableReader_606|10000.00|root||data:TableFullScan_605|
|  │ └─TableFullScan_605|10000.00|cop[tikv]|table:u, partition:p164|keep order:false, stats:pseudo|
|  ├─TableReader_608|10000.00|root||data:TableFullScan_607|
|  │ └─TableFullScan_607|10000.00|cop[tikv]|table:u, partition:p165|keep order:false, stats:pseudo|
|  ├─TableReader_610|10000.00|root||data:TableFullScan_609|
|  │ └─TableFullScan_609|10000.00|cop[tikv]|table:u, partition:p166|keep order:false, stats:pseudo|
|  ├─TableReader_612|10000.00|root||data:TableFullScan_611|
|  │ └─TableFullScan_611|10000.00|cop[tikv]|table:u, partition:p167|keep order:false, stats:pseudo|
|  ├─TableReader_614|10000.00|root||data:TableFullScan_613|
|  │ └─TableFullScan_613|10000.00|cop[tikv]|table:u, partition:p168|keep order:false, stats:pseudo|
|  ├─TableReader_616|10000.00|root||data:TableFullScan_615|
|  │ └─TableFullScan_615|10000.00|cop[tikv]|table:u, partition:p169|keep order:false, stats:pseudo|
|  ├─TableReader_618|10000.00|root||data:TableFullScan_617|
|  │ └─TableFullScan_617|10000.00|cop[tikv]|table:u, partition:p170|keep order:false, stats:pseudo|
|  ├─TableReader_620|10000.00|root||data:TableFullScan_619|
|  │ └─TableFullScan_619|10000.00|cop[tikv]|table:u, partition:p171|keep order:false, stats:pseudo|
|  ├─TableReader_622|10000.00|root||data:TableFullScan_621|
|  │ └─TableFullScan_621|10000.00|cop[tikv]|table:u, partition:p172|keep order:false, stats:pseudo|
|  ├─TableReader_624|10000.00|root||data:TableFullScan_623|
|  │ └─TableFullScan_623|10000.00|cop[tikv]|table:u, partition:p173|keep order:false, stats:pseudo|
|  ├─TableReader_626|10000.00|root||data:TableFullScan_625|
|  │ └─TableFullScan_625|10000.00|cop[tikv]|table:u, partition:p174|keep order:false, stats:pseudo|
|  ├─TableReader_628|10000.00|root||data:TableFullScan_627|
|  │ └─TableFullScan_627|10000.00|cop[tikv]|table:u, partition:p175|keep order:false, stats:pseudo|
|  ├─TableReader_630|10000.00|root||data:TableFullScan_629|
|  │ └─TableFullScan_629|10000.00|cop[tikv]|table:u, partition:p176|keep order:false, stats:pseudo|
|  ├─TableReader_632|10000.00|root||data:TableFullScan_631|
|  │ └─TableFullScan_631|10000.00|cop[tikv]|table:u, partition:p177|keep order:false, stats:pseudo|
|  ├─TableReader_634|10000.00|root||data:TableFullScan_633|
|  │ └─TableFullScan_633|10000.00|cop[tikv]|table:u, partition:p178|keep order:false, stats:pseudo|
|  ├─TableReader_636|10000.00|root||data:TableFullScan_635|
|  │ └─TableFullScan_635|10000.00|cop[tikv]|table:u, partition:p179|keep order:false, stats:pseudo|
|  ├─TableReader_638|10000.00|root||data:TableFullScan_637|
|  │ └─TableFullScan_637|10000.00|cop[tikv]|table:u, partition:p180|keep order:false, stats:pseudo|
|  ├─TableReader_640|10000.00|root||data:TableFullScan_639|
|  │ └─TableFullScan_639|10000.00|cop[tikv]|table:u, partition:p181|keep order:false, stats:pseudo|
|  ├─TableReader_642|10000.00|root||data:TableFullScan_641|
|  │ └─TableFullScan_641|10000.00|cop[tikv]|table:u, partition:p182|keep order:false, stats:pseudo|
|  ├─TableReader_644|10000.00|root||data:TableFullScan_643|
|  │ └─TableFullScan_643|10000.00|cop[tikv]|table:u, partition:p183|keep order:false, stats:pseudo|
|  ├─TableReader_646|10000.00|root||data:TableFullScan_645|
|  │ └─TableFullScan_645|10000.00|cop[tikv]|table:u, partition:p184|keep order:false, stats:pseudo|
|  ├─TableReader_648|10000.00|root||data:TableFullScan_647|
|  │ └─TableFullScan_647|10000.00|cop[tikv]|table:u, partition:p185|keep order:false, stats:pseudo|
|  ├─TableReader_650|10000.00|root||data:TableFullScan_649|
|  │ └─TableFullScan_649|10000.00|cop[tikv]|table:u, partition:p186|keep order:false, stats:pseudo|
|  ├─TableReader_652|10000.00|root||data:TableFullScan_651|
|  │ └─TableFullScan_651|10000.00|cop[tikv]|table:u, partition:p187|keep order:false, stats:pseudo|
|  ├─TableReader_654|10000.00|root||data:TableFullScan_653|
|  │ └─TableFullScan_653|10000.00|cop[tikv]|table:u, partition:p188|keep order:false, stats:pseudo|
|  ├─TableReader_656|10000.00|root||data:TableFullScan_655|
|  │ └─TableFullScan_655|10000.00|cop[tikv]|table:u, partition:p189|keep order:false, stats:pseudo|
|  ├─TableReader_658|10000.00|root||data:TableFullScan_657|
|  │ └─TableFullScan_657|10000.00|cop[tikv]|table:u, partition:p190|keep order:false, stats:pseudo|
|  ├─TableReader_660|10000.00|root||data:TableFullScan_659|

......
|  │ └─TableFullScan_785|10000.00|cop[tikv]|table:u, partition:p254|keep order:false, stats:pseudo|
|  └─TableReader_788|10000.00|root||data:TableFullScan_787|
|    └─TableFullScan_787|10000.00|cop[tikv]|table:u, partition:p255|keep order:false, stats:pseudo|
  1. 测试了下,和您这边的执行计划基本一致,我们查看下,会尽快反馈,多谢

您好,这个问题确认了下,当前分区表还不支持 index join ,估计在 5.0 会实现,我会提个需求,多谢。

好的,收到

:handshake:

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。