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 [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)