-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
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
index join exceeding memory of quota may hang the session #45716
Labels
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Comments
aytrack
added
type/bug
The issue is confirmed as a bug.
sig/planner
SIG: Planner
severity/major
labels
Aug 1, 2023
ti-chi-bot
bot
added
may-affects-5.2
This bug maybe affects 5.2.x versions.
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
labels
Aug 1, 2023
introduced by #45617 |
aytrack
removed
may-affects-5.2
This bug maybe affects 5.2.x versions.
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
labels
Aug 1, 2023
before pr 45617, the plan is [18:07:05]TiDB root:test> explain select /*+ inl_join(t2) */ * from t1 join t2 on t1.a = t2.a;
+-------------------------+----------+-----------+----------------------+-----------------------------------------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+-------------------------+----------+-----------+----------------------+-----------------------------------------------------------------------------------------------------------------+
| IndexJoin_12 | 12487.50 | root | | inner join, inner:IndexReader_11, outer key:test.t1.a, inner key:test.t2.a, equal cond:eq(test.t1.a, test.t2.a) |
| ├─IndexReader_21(Build) | 9990.00 | root | | index:IndexFullScan_20 |
| │ └─IndexFullScan_20 | 9990.00 | cop[tikv] | table:t1, index:a(a) | keep order:false, stats:pseudo |
| └─IndexReader_11(Probe) | 12487.50 | root | | index:Selection_10 |
| └─Selection_10 | 12487.50 | cop[tikv] | | not(isnull(test.t2.a)) |
| └─IndexRangeScan_9 | 12500.00 | cop[tikv] | table:t2, index:a(a) | range: decided by [eq(test.t2.a, test.t1.a)], keep order:false, stats:pseudo |
+-------------------------+----------+-----------+----------------------+-----------------------------------------------------------------------------------------------------------------+
6 rows in set after +-------------------------+----------+-----------+----------------------+-----------------------------------------------------------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+-------------------------+----------+-----------+----------------------+-----------------------------------------------------------------------------------------------------------------+
| IndexJoin_12 | 12487.50 | root | | inner join, inner:IndexReader_11, outer key:test.t1.a, inner key:test.t2.a, equal cond:eq(test.t1.a, test.t2.a) |
| ├─IndexReader_32(Build) | 9990.00 | root | | index:IndexFullScan_31 |
| │ └─IndexFullScan_31 | 9990.00 | cop[tikv] | table:t1, index:a(a) | keep order:false, stats:pseudo |
| └─IndexReader_11(Probe) | 12487.50 | root | | index:Selection_10 |
| └─Selection_10 | 12487.50 | cop[tikv] | | not(isnull(test.t2.a)) |
| └─IndexRangeScan_9 | 12500.00 | cop[tikv] | table:t2, index:a(a) | range: decided by [eq(test.t2.a, test.t1.a)], keep order:false, stats:pseudo |
+-------------------------+----------+-----------+----------------------+-----------------------------------------------------------------------------------------------------------------+
6 rows in set |
These 2 plans are the same, just have some different operator IDs. Please help take a look at this issue @wshwsh12 |
12 tasks
wshwsh12
added
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.1
This bug affects the 6.1.x(LTS) versions.
labels
Aug 8, 2023
This was referenced Aug 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
report exceed memory quota error
3. What did you see instead (Required)
the second query for a long time and no reocrd returned. the session maybe hang.
tidb log
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: