[MDEV-8620] PARTITION() function Created: 2015-08-14 Updated: 2017-05-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Federico Razzoli | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| 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:
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) |
| Comments |
| Comment by roberto spadim [ 2015-08-14 ] |
|
i think this could be developed with a UDF, but i don't know how could more than one column be used, something like: |