mysql> explain analyze select * from customer where C_CUSTKEY in (select C_CUSTKEY from tempcustomer limit 1);
+--------------------------------+---------+---------+-----------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+------+
| id | estRows | actRows | task | access object | execution info | operator info | memory | disk |
+--------------------------------+---------+---------+-----------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+------+
| IndexHashJoin_17 | 1.00 | 1 | root | | time:2.38ms, loops:2, inner:{total:1.58ms, concurrency:5, task:1, construct:10.7µs, fetch:1.56ms, build:3.23µs, join:4.12µs} | inner join, inner:TableReader_12, outer key:tpch2.tempcustomer.c_custkey, inner key:tpch2.customer.c_custkey, equal cond:eq(tpch2.tempcustomer.c_custkey, tpch2.customer.c_custkey) | 138.3 KB | N/A |
| ├─Limit_22(Build) | 1.00 | 1 | root | | time:696.4µs, loops:3 | offset:0, count:1 | N/A | N/A |
| │ └─TableReader_26 | 1.00 | 1 | root | | time:694.9µs, loops:1, cop_task: {num: 1, max: 712.4µs, proc_keys: 1, rpc_num: 1, rpc_time: 690µs, copr_cache: disabled, distsql_concurrency: 1} | data:Limit_25 | 231 Bytes | N/A |
| │ └─Limit_25 | 1.00 | 1 | cop[tikv] | | tikv_task:{time:0s, loops:1}, scan_detail: {total_process_keys: 1, total_process_keys_size: 27, total_keys: 2, get_snapshot_time: 19.4µs, rocksdb: {key_skipped_count: 1, block: {cache_hit_count: 5}}} | offset:0, count:1 | N/A | N/A |
| │ └─TableFullScan_24 | 1.00 | 1 | cop[tikv] | table:tempcustomer | tikv_task:{time:0s, loops:1} | keep order:false | N/A | N/A |
| └─TableReader_12(Probe) | 1.00 | 1 | root | | time:1.5ms, loops:2, cop_task: {num: 1, max: 1.46ms, proc_keys: 1, rpc_num: 1, rpc_time: 1.45ms, copr_cache: disabled, distsql_concurrency: 15} | data:TableRangeScan_11 | N/A | N/A |
| └─TableRangeScan_11 | 1.00 | 1 | cop[tikv] | table:customer | tikv_task:{time:0s, loops:1}, scan_detail: {total_process_keys: 1, total_process_keys_size: 184, total_keys: 1, get_snapshot_time: 987.6µs, rocksdb: {block: {cache_hit_count: 5}}} | range: decided by [tpch2.tempcustomer.c_custkey], keep order:false | N/A | N/A |
+--------------------------------+---------+---------+-----------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+------+
7 rows in set (0.00 sec)
像这个limit 也有build