Skip to content

Slow query on 27.0.1 RC1 #4522

@juliusknorr

Description

@juliusknorr

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) |
+------+--------------------+------------------+-------+---------------------------------------------+----------------------+---------+------+--------+-------------------------------------------------------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghigh

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions