← Back to team overview

maria-discuss team mailing list archive

Re: Partition a Huge table


Thanks Peter. I am moving this database to a new datacenter. So i do have a backup slave. I tried this approach on QA and worked fine. Need to know if there is any known issues before i migrate the prod.

      From: Peter Mclarty <peter.mclarty@xxxxxxxxxxxxxxxxxxxxxxx>
 To: Suresh Rajagopal <sureshr7@xxxxxxxxx> 
Cc: Maria Discuss <maria-discuss@xxxxxxxxxxxxxxxxxxx>
 Sent: Monday, March 13, 2017 6:07 PM
 Subject: Re: [Maria-discuss] Partition a Huge table
Hi SuershI would add a second slave as insurance before doing this to provide some risk mitigation. Make sure you have adequate spare space on your slave as you will want as much again as the table to make changes. make sure you have chosen the right approach to your partitioning before doing anything. 
We have made a number of changes to our system over the past three years to grow and often made them on the slave and promoted it as the master, applied the schema change on the old master and added it back as the slave. We couldn't afford the two or three hours to lock key tables to add columns and took this approach
On Tue, Mar 14, 2017 at 10:34 AM, Suresh Rajagopal <sureshr7@xxxxxxxxx> wrote:

What is the fastest approach to partition a huge table with 2 additional columns? How safe its to alter table on slave and promote slave as master? It takes 25 hours to alter the table for now on slave.
MariaDB Version : 10.1.18OS              : Centos 6
______________________________ _________________
Mailing list: https://launchpad.net/~maria- discuss
Post to     : maria-discuss@lists.launchpad. net
Unsubscribe : https://launchpad.net/~maria- discuss
More help   : https://help.launchpad.net/ ListHelp

Peter McLartyDBA WHSRCompare The MarketP: +61 7 3377 8952M: +61 4 0209 4238http://www.comparethemarket.com.au
“Progress is impossible without change, and those who cannot change their minds cannot change anything.” - George Bernard Shaw

Compare The Market is a brand and trading name of Compare The Market (Pty) Ltd (CTM). This email is for the intended addressee and is confidential and subject to copyright. 
If you are not the intended addressee, confidentiality has not been waived and any use, interference with, or disclosure of this email is unauthorised. 
If you are not the intended addressee please immediately notify CTM and then delete the email. CTM does not warrant that this email is error or virus free.