Rechercher dans le manuel MySQL
23.6.3 Partitioning Limitations Relating to Functions
This section discusses limitations in MySQL Partitioning relating specifically to functions used in partitioning expressions.
Only the MySQL functions shown in the following list are allowed in partitioning expressions:
FLOOR()
(see CEILING() and FLOOR())UNIX_TIMESTAMP()
(withTIMESTAMP
columns)
In MySQL 8.0, partition pruning is supported for
the TO_DAYS()
,
TO_SECONDS()
,
YEAR()
, and
UNIX_TIMESTAMP()
functions. See
Section 23.4, “Partition Pruning”, for more information.
CEILING() and FLOOR().
Each of these functions returns an integer only if it is
passed an argument of an exact numeric type, such as one of
the INT
types or
DECIMAL
. This means, for
example, that the following CREATE
TABLE
statement fails with an error, as shown here:
- -> );
EXTRACT() function with WEEK specifier.
The value returned by the
EXTRACT()
function, when used
as EXTRACT(WEEK FROM
, depends on the
value of the
col
)default_week_format
system
variable. For this reason,
EXTRACT()
is not permitted as a
partitioning function when it specifies the unit as
WEEK
. (Bug #54483)
See Section 12.6.2, “Mathematical Functions”, for more information about the return types of these functions, as well as Section 11.2, “Numeric Types”.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-partitioning-limitations-functions.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.