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

MariaDB behaviour with many JOINs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2.16, 10.3.15, 10.4.5
    • Fix Version/s: 10.2, 10.3, 10.4
    • Component/s: Optimizer
    • Labels:
    • Environment:
      Linux x64

      Description

      I found MariaDB behaviour changing according to the number of JOINs in a query.
      In this particular application, when the number of JOINs goes from 30 to 31 the execution plan changes, causing potential problems to the execution time and resources management.
      The tests were made with few records and with millions of records: apparently this behaviour doesn't depend on the number of records, but when they are millions, the chosen plan considerably slows down execution using gigabytes of temporary files and can crash entire system.
      I couldn't find any configuration parameters that drive this behaviour, I don't know if it can be changed

        Attachments

        1. data_definition.txt
          6 kB
        2. explain_30_join.txt
          6 kB
        3. explain_31_join.txt
          6 kB
        4. query.txt
          3 kB

          Issue Links

            Activity

              People

              Assignee:
              igor Igor Babaev
              Reporter:
              SuperC SuperC
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: