MySQL Forums
Forum List  »  Docs

Does functions in partition definition cause performance issues ?
Posted by: Jayakrishnan Karolil
Date: March 19, 2018 01:43PM

Question on this page:
https://dev.mysql.com/doc/refman/5.5/en/partitioning-range.html


PARTITION p0 VALUES LESS THAN ( UNIX_TIMESTAMP('2008-01-01 00:00:00') )

Because of the function in the partition, does it cause any performance issues during inserts since the function needs to be executed for each record getting inserted to identify the relevant partition?

Or, does MySQL perform the conversion into unix_timestamp during table creation ?

When I create a table with the unix_timestamp function in partition statements, and then export the create statement back using mysqldump, resulting SQL doesn't contain UNIX_TIMESTAMP('<timestamp here>'). Instead it contains values like this:

PARTITION p0 VALUES LESS THAN ( 1199145600 ).

So assuming the conversion to unix_timestamp is happening while table creation.
Can somebody confirm the logic that is implemented?

Options: ReplyQuote


Subject
Views
Written By
Posted
Does functions in partition definition cause performance issues ?
119
March 19, 2018 01:43PM


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.