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

Debug server is extremely slow upon ANALYZE FORMAT=JSON with long literals

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
    • 10.5
    • Debug, Optimizer

    Description

      ANALYZE FORMAT=JSON SELECT ... below takes very long time on a debug server (> 1min). Also, it doesn't respect KILL QUERY / max_statement_time limit and remains in "Killed" state holding the table.

      On a release server the same query is instantaneous.

      I fully realize that debug server is bound to be slower, but I think it's worth checking, when/if priorities permit, whether it should be that much slower.

      The SELECT itself, without ANALYZE, is very fast both on debug and non-debug (less than 1 second).

      Warning: ANALYZE FORMAT=JSON prints the final generated value of REPEAT('x',50000000), so it will flood the screen and scroll-back history unless you suppress the output or redirect it somewhere.

      Important: The test needs to be run with max-allowed-packet=128M or alike. If you run it via MTR, it's --mysqld=--max-allowed-packet=128M. If you run it via command-line client, the option max-allowed-packet=128M should be passed both to the server and to the client.

      CREATE OR REPLACE TABLE t1 (a VARCHAR(8));
      INSERT INTO t1 VALUES ('foo'),('bar'),('qux');
      ANALYZE FORMAT=JSON SELECT * FROM t1 WHERE STRCMP(REPEAT('x',50000000),a);
      

      10.6 1bd41158 debug

      1 row in set (1 min 5.502 sec)
      

      10.6 1bd41158 non-debug

      1 row in set (0.432 sec)
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:

                Git Integration

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