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

PARTITION() function

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Can you implement a function (or any other syntax, if a function is not appropriated) returning the name of a partition/subpartition containing a PK entry? For example:

      SELECT PARTITION(id) FROM user WHERE id = 98765;
      

      Why am I asking this? Consider RANGE [COLUMNS] and LIST [COLUMNS] partitioning. The name of the (sub)partition is often a useful information. Of course, if we select the columns involved in the partitioning expression, we can calculate this information; but having the information pre-calculated by MariaDB could be more efficient, and more convenient. It could even allow to hide the DB complexity to developers.

      (Apache Cassandra has even Static Columns, that is, a single value can be assigned to all rows in a given partition. But it seems to me unnecessarily complicated)

      Attachments

        Activity

          People

            Unassigned Unassigned
            f_razzoli Federico Razzoli
            Votes:
            1 Vote for this issue
            Watchers:
            5 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.