MySQL Forums
Forum List  »  Partitioning

Re: HOw is in partitioning by range implemented the UPDATE statement ...
Posted by: Mattias Jonsson
Date: December 11, 2008 11:15AM

If you want to have `ID` unique (and enforced by the server) then you should have it in a primary key, or use a unique key (which will force you to include it in the partitioning function).

If the update is within the same partition, then there is no real overhead.
If the update moves the row from one partition to another, then it is the same as a INSERT + DELETE.
(for the details, look into sql/ha_partition.cc, ha_partition::update_row)

The record is only marked for deletion (it is really up to the storage engine).

It might cause fragmentation, if the 'deleted' hole is filled again and the row format is dynamic.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: HOw is in partitioning by range implemented the UPDATE statement ...
2750
December 11, 2008 11:15AM


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.