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

Severe performance regression on SELECT queries using VIEWs between MariaDB 10.11.2 and >= 10.11.8

    XMLWordPrintable

Details

    Description

      Hello MariaDB Team,

      I would like to report what appears to be a significant performance regression affecting SELECT queries executed on complex VIEWs in MariaDB 10.11.x.

      Affected versions

      MariaDB 10.11.2 – fast and stable, expected performance

      MariaDB 10.11.8 and newer (tested up to 12.1) – severe performance degradation

      Our production environment is currently running on MariaDB 10.11.2, where the workload performs well and has been stable for a long time.

      Problem summary

      Under the same conditions (identical schema, data set, configuration, and steady-state workload):

      MariaDB 10.11.2 executes the query in approximately 3 seconds

      MariaDB 10.11.8+ executes the same query in approximately 35 seconds

      This represents a performance drop of more than 10×.

      Workload characteristics

      Storage engine: InnoDB

      Queries: SELECTs executed on complex VIEWs

      VIEWs contain multiple JOINs

      Frequent UPDATEs on underlying base tables

      Dataset fully fits in RAM

      Buffer pool hit rate close to 100%

      No lock waits or long-running transactions

      Disk I/O during query execution is negligible

      Key observations

      The issue primarily affects SELECT queries executed on VIEWs

      Equivalent SELECT queries run directly against the underlying base tables are significantly faster

      EXPLAIN plans look logically equivalent between versions

      Increasing innodb_buffer_pool_size (to several GB) does not improve performance on 10.11.8+

      Adaptive Hash Index ON/OFF does not materially change the behavior

      InnoDB status shows no contention and no pending I/O

      The regression is consistently reproducible

      Regression scope

      The problem is present in all tested versions starting from MariaDB 10.11.8 and newer (last tested version: 12.1).
      I have not yet identified the exact release where the regression was introduced, as I have not performed a full version-by-version bisect.

      Diagnostics provided

      I am attaching EXPLAIN output for the affected query from:

      MariaDB 10.11.2 (fast execution)

      MariaDB 10.11.8+ (slow execution)

      Please note that these diagnostics should not be interpreted as coming from intentionally different datasets. At the time of collecting this information, I did not repeatedly upgrade and downgrade the database solely for demonstration purposes, as this would have required a significant amount of time. If a strict side-by-side comparison on fully identical data is required, I can prepare that at a later stage.

      --------------------

      I think this behavior potentially relate to:

      A regression in VIEW execution or optimization

      Changes in how JOINs inside VIEWs are planned or executed

      Optimizer or InnoDB behavior changes introduced between 10.11.2 and 10.11.8

      Thank you very much for your time and any guidance you can provide.

      Kind regards

      Attachments

        Activity

          People

            Unassigned Unassigned
            tfilipiak Thomas
            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.