We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
enable index merge, check the execution plan:
TiDB(root@127.0.0.1:test) > create table t (a bigint, b bigint, index idx_a(a), index idx_b(b)); Query OK, 0 rows affected (0.01 sec) TiDB(root@127.0.0.1:test) > set @@tidb_enable_index_merge = 1; Query OK, 0 rows affected (0.00 sec) TiDB(root@127.0.0.1:test) > desc select * from t use index(idx_a, idx_b) where a > 1 or b > 1; +-------------------------+---------+-----------+------------------------------------------------------------------+ | id | estRows | task | operator info | +-------------------------+---------+-----------+------------------------------------------------------------------+ | IndexMerge_16 | 6666.67 | root | | | ├─IndexRangeScan_13 | 3333.33 | cop[tikv] | table:t, index:a, range:(1,+inf], keep order:false, stats:pseudo | | ├─IndexRangeScan_14 | 3333.33 | cop[tikv] | table:t, index:b, range:(1,+inf], keep order:false, stats:pseudo | | └─TableRowIDScan_15 | 6666.67 | cop[tikv] | table:t, keep order:false, stats:pseudo | +-------------------------+---------+-----------+------------------------------------------------------------------+ 4 rows in set (0.00 sec)
show the build and probe side as index lookup did:
TiDB(root@127.0.0.1:test) > desc select * from t use index(idx_a) where a > 1 or b > 1; +------------------------------+----------+-----------+--------------------------------------------------+ | id | estRows | task | operator info | +------------------------------+----------+-----------+--------------------------------------------------+ | IndexLookUp_8 | 8000.00 | root | | | ├─IndexFullScan_5(Build) | 10000.00 | cop[tikv] | table:t, index:a, keep order:false, stats:pseudo | | └─Selection_7(Probe) | 8000.00 | cop[tikv] | or(gt(test.t.a, 1), gt(test.t.b, 1)) | | └─TableRowIDScan_6 | 10000.00 | cop[tikv] | table:t, keep order:false, stats:pseudo | +------------------------------+----------+-----------+--------------------------------------------------+ 4 rows in set (0.00 sec)
didn't show these two suffixes.
tidb-server -V
select tidb_version();
TiDB(root@127.0.0.1:test) > select tidb_version()\G *************************** 1. row *************************** tidb_version(): Release Version: v4.0.0-beta-329-g0aef6eca2 Git Commit Hash: 0aef6eca2c661a69819f403be20a743a978cbe70 Git Branch: master UTC Build Time: 2020-03-08 04:56:50 GoVersion: go1.13.8 Race Enabled: false TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 Check Table Before Drop: false 1 row in set (0.01 sec)
The text was updated successfully, but these errors were encountered:
Is this your expectation?
+--------------------------------+---------+-----------+------------------------------------------------------------------+ | id | estRows | task | operator info | +--------------------------------+---------+-----------+------------------------------------------------------------------+ | IndexMerge_16 | 6666.67 | root | | | ├─IndexRangeScan_13 (Build) | 3333.33 | cop[tikv] | table:t, index:a, range:(1,+inf], keep order:false, stats:pseudo | | ├─IndexRangeScan_14 (Build) | 3333.33 | cop[tikv] | table:t, index:b, range:(1,+inf], keep order:false, stats:pseudo | | └─TableRowIDScan_15 (Probe) | 6666.67 | cop[tikv] | table:t, keep order:false, stats:pseudo | +--------------------------------+---------+-----------+------------------------------------------------------------------+
Sorry, something went wrong.
LittleFall
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
enable index merge, check the execution plan:
2. What did you expect to see?
show the build and probe side as index lookup did:
3. What did you see instead?
didn't show these two suffixes.
4. What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: