Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

So I found this other post; Merge multiple tables in a database And that's the general idea, but at an insanely large scale.

Anyway -- Over the years, Our site has adapted and three different things have developed in the tables and they're kinda the same thing; submitted content. I have journals, images, and links; However there's not a REAL reason for these to be separate, and for the benefit of table organization, i'd like to reduce them to a single table; posts.

So the problem is this;

Journals has 2.6 million rows. Images has 1.4 million rows. And Links has a cute 45 thousand rows.

Now, some of the columns need to be remapped for the sake of logic. Simple stuff like "friends_only" column becoming "privacy", which is simple enough.

What would the recommended course of action be for migrating these tables, or is sticking with a perl script that runs through all 4 million+ records the best way of doing it?

share|improve this question
1  
It would be useful if you gave more details about your data and setup. Could you please add to your question the output of show create table X, where X would be each of your three tables? Also, where are you running these databases? I'd guess on AWS because of the tag -- if this is the case, is this RDS, or did you install MySQL on an instance on EC2 by yourself? –  Bruno Reis Sep 9 '13 at 4:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.