MySQL Forums
Forum List  »  Partitioning

Re: Subpartitioning on number of rows in partition(column) --AND-- Aggregate Query Execution
Posted by: Jonathan Stephens
Date: January 04, 2007 05:29PM

Hi,

You can alter the partitioning (and subpartitioning) of a table on the fly.

If you wanted to do so based on the number of rows in the table, you could likely do this using an INSERT trigger.

Pruning can work with HASH or KEY partitions or subpartitions, but only for queries using integer columns - you'd have to store the datetime values as Unix timestamps (not MySQL TIMESTAMP which is for this purpose the same as DATETIME) or suchlike.

As for the the bulk inserts, I don't know of any reason why you can't perform those on a partitioned table, and doing so would not affect the operation of any triggers you might have on the table. (In other words, if you've an INSERT trigger on table t1, then INSERT INTO t1 (id, name) VALUES('', 'Larry'), ('', 'Curly'), ('', 'Moe'); causes the trigger to fire 3 times - once for each row that's inserted.)

Jon Stephens
MySQL Documentation Team @ Oracle
Orlando, Florida, USA

MySQL Dev Zone
MySQL Server Documentation
Oracle

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Subpartitioning on number of rows in partition(column) --AND-- Aggregate Query Execution
2408
January 04, 2007 05:29PM


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.