79672836

Date: 2025-06-20 03:52:04
Score: 1
Natty:
Report link

Partitioning Limitations Relating to Functions

https://dev.mysql.com/doc/mysql-partitioning-excerpt/8.0/en/partitioning-limitations-functions.html

Only the MySQL functions shown in the following list are allowed in partitioning expressions:

ABS()

CEILING() (see CEILING() and FLOOR())

DATEDIFF()

DAY()

DAYOFMONTH()

DAYOFWEEK()

DAYOFYEAR()

EXTRACT() (see EXTRACT() function with WEEK specifier)

FLOOR() (see CEILING() and FLOOR())

HOUR()

MICROSECOND()

MINUTE()

MOD()

MONTH()

QUARTER()

SECOND()

TIME_TO_SEC()

TO_DAYS()

TO_SECONDS()

UNIX_TIMESTAMP() (with TIMESTAMP columns)

WEEKDAY()

YEAR()

YEARWEEK()

In MySQL 8.0, partition pruning is supported for the TO_DAYS(), TO_SECONDS(), YEAR(), and UNIX_TIMESTAMP()

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Xiaozhi Ma