Details

    • New Feature
    • Status: In Testing (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.8
    • Optimizer
    • None

    Description

      The hint limits the time of statement execution to the number of milliseconds given in the hint argument. The syntax is as follows:

      SELECT /*+ MAX_EXECUTION_TIME(milliseconds) */ ... 
      

      Only top-level SELECT statements support the hint. Trying to apply it to INSERT, REPLACE, UPDATE and DELETE must issue a warning. The hint is not supported inside stored procedures, triggers, events and subqueries.

      Correctly handle situations where max_statement_time variable is set like here:

      SET STATEMENT max_statement_time=1 FOR
      SELECT /*+ MAX_EXECUTION_TIME(500) */ count(*) FROM t1 a;
      

      In this case a warning must be issued, and the hint MAX_EXECUTION_TIME must be ignored.

      Attachments

        Issue Links

          Activity

            oleg.smirnov Oleg Smirnov added a comment -

            The final version is in the branch

            bb-opt-hints-1

            .

            oleg.smirnov Oleg Smirnov added a comment - The final version is in the branch bb-opt-hints-1 .

            pushed into bb-11.8-MDEV-35504-opt-hints for buildbot to know the branch so that it could use correct builders

            serg Sergei Golubchik added a comment - pushed into bb-11.8- MDEV-35504 -opt-hints for buildbot to know the branch so that it could use correct builders
            Roel Roel Van de Paar added a comment - - edited

            Please note that this feature may make MDEV-33285 [Assertion `m_table' failed in ha_perfschema::rnd_end on CHECKSUM TABLE] more pronounced.

            Roel Roel Van de Paar added a comment - - edited Please note that this feature may make MDEV-33285 [Assertion `m_table' failed in ha_perfschema::rnd_end on CHECKSUM TABLE] more pronounced.
            oleg.smirnov Oleg Smirnov added a comment -

            Pushed a new branch bb-11.8-MDEV-35504-opt-hints-v2 including the most recent commits to main.

            oleg.smirnov Oleg Smirnov added a comment - Pushed a new branch bb-11.8- MDEV-35504 -opt-hints-v2 including the most recent commits to main .
            Roel Roel Van de Paar added a comment -

            A large number of the UBSAN issues found in the first iteration of the branch have since been resolved in trunk and are not present in -v2.

            Roel Roel Van de Paar added a comment - A large number of the UBSAN issues found in the first iteration of the branch have since been resolved in trunk and are not present in -v2.

            People

              Roel Roel Van de Paar
              oleg.smirnov Oleg Smirnov
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.