Skip to content
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

Slow query on 27.0.1 RC1 #4522

Closed
juliushaertl opened this issue Jul 14, 2023 · 0 comments · Fixed by #4521
Closed

Slow query on 27.0.1 RC1 #4522

juliushaertl opened this issue Jul 14, 2023 · 0 comments · Fixed by #4521
Labels
bug Something isn't working high

Comments

@juliushaertl
Copy link
Member

From #4339

MariaDB [oc]> EXPLAIN DELETE FROM `oc_text_sessions` WHERE `id` IN (SELECT `s`.`id` FROM `oc_text_sessions` `s` LEFT JOIN `oc_text_steps` `st` ON `st`.`session_id` = `s`.`id` WHERE (`s`.`document_id` = '6975006') AND (`last_contact` < '1689318422') AND (`st`.`id` IS NULL));
+------+--------------------+------------------+-------+---------------------------------------------+----------------------+---------+------+--------+-------------------------------------------------------------+
| id   | select_type        | table            | type  | possible_keys                               | key                  | key_len | ref  | rows   | Extra                                                       |
+------+--------------------+------------------+-------+---------------------------------------------+----------------------+---------+------+--------+-------------------------------------------------------------+
|    1 | PRIMARY            | oc_text_sessions | ALL   | NULL                                        | NULL                 | NULL    | NULL | 4593   | Using where                                                 |
|    2 | DEPENDENT SUBQUERY | s                | range | PRIMARY,ts_docid_lastcontact,ts_lastcontact | ts_docid_lastcontact | 16      | NULL | 1      | Using where; Using index                                    |
|    2 | DEPENDENT SUBQUERY | st               | ALL   | NULL                                        | NULL                 | NULL    | NULL | 270220 | Using where; Not exists; Using join buffer (flat, BNL join) |
+------+--------------------+------------------+-------+---------------------------------------------+----------------------+---------+------+--------+-------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant