Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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 [COKUMNS] 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)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            rspadim roberto spadim added a comment -

            i think this could be developed with a UDF, but i don't know how could more than one column be used, something like:
            partition_name( schema name, table name, column1, value1, column2, value2, ...... , column<n>, value<n>)

            Show
            rspadim roberto spadim added a comment - i think this could be developed with a UDF, but i don't know how could more than one column be used, something like: partition_name( schema name, table name, column1, value1, column2, value2, ...... , column<n>, value<n>)

              People

              • Assignee:
                Unassigned
                Reporter:
                f_razzoli Federico Razzoli
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: