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

Plan selection takes forever with MDEV-28852 comparing to reasonable time without

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 10.10.1
    • Optimizer
    • None

    Description

      By "forever" in the summary I mean that I have never seen it finish, the longest I waited before interrupting was ~1 hour.

      The test uses all default server startup options, loads original data set from MDEV-28073 (xpo_full_testcase.sql), runs ANALYZE PERSISTENT FOR ALL on all tables, and executes EXPLAIN for a query structured identically to MDEV-28073 (minus a couple of last JOINs), but the tables and fields in the query are mixed up - that is, different tables and fields from the dataset appear in different JOIN positions and conditions. The exact query will be provided.

      A slight abnormality of this particular query is that one of ON conditions compares a datetime field to a string literal (not convertible into a proper date time), and thus produces Truncated incorrect datetime value warning (ER_TRUNCATED_WRONG_VALUE). I'm not sure whether it's a decisive factor for the problem, but it's possible. Except for this condition, the query is identical to MDEV-28928.

      The query was executed with EXPLAIN FORMAT=JSON on several different versions/builds for comparison. All builds are non-debug.

      preview-10.10-optimizer f332260c98

      |  4 | root | localhost:36260 | test | Query   |  590 | Statistics | EXPLAIN FORMAT=JSON SELECT * FROM ((((((((((((((((
      ...
      

      It looks the same with optimizer_prune_level=2 (default) and 1.

      preview-10.10-optimizer, MDEV-28852 baseline (07a31de109)

      MariaDB [test]> EXPLAIN FORMAT=JSON SELECT * FROM (((((((((((((((( 
      ...
      1 row in set, 1 warning (36.832 sec)
      

      10.6 main 0e4cf497

      MariaDB [test]> EXPLAIN FORMAT=JSON SELECT * FROM (((((((((((((((( 
      ...
      1 row in set, 1 warning (9.314 sec)
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            Assignee Elena Stepanova [ elenst ] Sergei Petrunia [ psergey ]
            psergei Sergei Petrunia made changes -
            Attachment chart1-best-extensions-counts.png [ 64397 ]
            psergei Sergei Petrunia made changes -
            Attachment chart2-best-extensions-grows.png [ 64398 ]
            psergei Sergei Petrunia made changes -
            psergei Sergei Petrunia made changes -
            Attachment chart04-improved-pruning.png [ 64420 ]
            psergei Sergei Petrunia made changes -
            Attachment chart04-pruning-in-table0.png [ 64440 ]
            psergei Sergei Petrunia made changes -
            psergei Sergei Petrunia made changes -
            Attachment chart06-improved-pruning-v3.png [ 64445 ]
            psergei Sergei Petrunia made changes -
            Attachment pruning-v3-log.txt [ 64446 ]
            psergei Sergei Petrunia made changes -
            psergei Sergei Petrunia made changes -
            Attachment pruning-v3-log.txt [ 64446 ]
            psergei Sergei Petrunia made changes -
            Attachment slide01.png [ 64460 ]
            elenst Elena Stepanova made changes -
            psergei Sergei Petrunia made changes -
            Fix Version/s 10.10.0 [ 27912 ]
            Fix Version/s 10.10 [ 27530 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -
            Fix Version/s 10.10.1 [ 27913 ]
            Fix Version/s 10.10.0 [ 27912 ]

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.