MySQL Forums :: Partitioning :: Range partitioning on floor (decimal(14.4)) doesn't work :/

Advanced Search

Re: Range partitioning on floor (decimal(14.4)) doesn't work :/
Posted by: Rick James ()
Date: July 14, 2014 06:45PM
In MySQL 5.7, partition pruning is supported for the TO_DAYS(), TO_SECONDS(), YEAR(), and UNIX_TIMESTAMP() functions. See Partition Pruning, for more information.
(What version are you on? Older versions had more restrictions.)

Yeah, Partitioning is rather restrictive.

As of 5.6.4, MySQL permits fractional seconds for TIME, DATETIME, and TIMESTAMP values, with up to microseconds (6 digits) precision. To define a column that includes a fractional seconds part, use the syntax type_name(fsp), where type_name is TIME, DATETIME, or TIMESTAMP, and fsp is the fractional seconds precision.
So, TIMESTAMP(4) would give you the equivalent of DECIMAL(14,4).
(If you want only milliseconds, then 3 instead of 4.)


since FLOOR does not change the functionality.

I tried your CREATE on 5.6.13 (even with the FLOOR()) -- I got no errors, and it did partition pruning correctly.

Options: ReplyQuote

Subject Views Written By Posted
Range partitioning on floor (decimal(14.4)) doesn't work :/ 2020 Max Herman 07/12/2014 12:35PM
Re: Range partitioning on floor (decimal(14.4)) doesn't work :/ 1146 Rick James 07/14/2014 06:45PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.