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

Add option for default local schema when I_S is queried

Details

    • Task
    • Status: In Review (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.2(EOL)
    • None
    • None

    Description

      If you have many thousands of databases, each with tables and an application you have no control over runs a query on I_S.COLUMNS or TABLES this can cause a significant amount of disk access which does not perform well.

      In many cases all that is really needed is the output for the current default schema. This is particularly true for hosting environments where it is typically a schema per application and you do not have control over the queries being executed by the application.

      The proposed solution is a new server variable with both a global and local option. When enabled I_S.COLUMNS and TABLES will only scan the current default schema if an explicit schema has not been provided in the WHERE condition.

      Attachments

        Issue Links

          Activity

            TheLinuxJedi Andrew Hutchings (Inactive) added a comment - - edited Proof of concept commit: https://github.com/LinuxJedi/server/commit/2b08d2bbac79bacf1aa32fabfbb3f2f98d995e3d

            Updated patch to solve an issue: https://github.com/LinuxJedi/server/commit/3529aba0174c44a740bfd50856b351c65acdda8c

            Need to fix the skipping of the passive filter when table_name is provided (uses_only_table_name_fields() detects either table and schema name).

            TheLinuxJedi Andrew Hutchings (Inactive) added a comment - Updated patch to solve an issue: https://github.com/LinuxJedi/server/commit/3529aba0174c44a740bfd50856b351c65acdda8c Need to fix the skipping of the passive filter when table_name is provided (uses_only_table_name_fields() detects either table and schema name).

            Solved the remaining problem. PR opened.

            TheLinuxJedi Andrew Hutchings (Inactive) added a comment - Solved the remaining problem. PR opened.

            PR reviewed by monty, minor changes made (described in a comment in the pull request)

            TheLinuxJedi Andrew Hutchings (Inactive) added a comment - PR reviewed by monty , minor changes made (described in a comment in the pull request)

            People

              serg Sergei Golubchik
              TheLinuxJedi Andrew Hutchings (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.