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

Implement MAX_EXECUTION_TIME hint

    XMLWordPrintable

Details

    • New Feature
    • Status: In Review (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

            People

              psergei Sergei Petrunia
              oleg.smirnov Oleg Smirnov
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.