MySQL Forums
Forum List  »  Partitioning

Re: Partitioning on account_id
Posted by: Rick James
Date: October 14, 2014 06:04PM

My tips on PARTITIONing:
http://mysql.rjweb.org/doc.php/ricksrots#partitioning

Given that you always have something like
WHERE account_id = <constant> AND ...
then partitioning on account_id is no more efficient than having all of the indexes be "compound" and start with account_id. This is regardless of the eventual size of the table.

Also, your table will barely meet the second bullet item, since it will grow to only 3M rows.

> If there are any potential down sides to doing this (even if the up-side might be small)

Both the up- and down-sides are tiny. So, why add the complexity?

You should, however, use ENGINE=InnoDB and have innodb_file_per_table=1 before CREATEing the TABLEs. (It can/should be fixed later, but at a cost.)

Options: ReplyQuote


Subject
Views
Written By
Posted
2462
October 13, 2014 02:54PM
Re: Partitioning on account_id
1229
October 14, 2014 06:04PM


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.