Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26856

Queries with many NOT IN clauses or ORs use a lot of memory

    XMLWordPrintable

    Details

      Description

      This is a followup to MDEV-21958.

      For certain WHERE clauses, range optimizer may consume O(N^2) memory.

      The cause of this is that tree_or() allocates its result on MEM_ROOT, while the arguments also remain allocated on MEM_ROOT (See MDEV-21958 for details).

      MDEV-21958 itself is marked as closed because I've pushed a limited-scope fix that prevented this behavior for a subset of queries.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psergei Sergei Petrunia
              Reporter:
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration