How to split a large innodb table into many tables.

Written on:September 17, 2015
Add One

Working on a large 20gb innodb table that gets new records inserted daily, I decided to archive some of the old data by splitting the table into many table_archive_2015M subtables by using its `date` column and grouping the data by month.

While running the following query:

insert into ranking_archive_201508 select * from ranking_dailyresults where date >= '2015-08-01' and date < '2015-09-01' LIMIT 500000;

I got the following error from the mysql 5.1 server.

ERROR 1206 (HY000): The total number of locks exceeds the lock table size

Continue reading “How to split a large innodb table into many tables.” »

Mysql: Repair all tables in a database with a couple of commands in Linux

Written on:September 16, 2015

The process is fairly simple. If you have dozens or hundreds of tables, it can be a hassle to repair them in phpmyadmin. Using a couple of shell commands, you can accomplish this repair task easily in a matter of seconds.


Amado Martinez

Written on:December 1, 2013

I’m still around. I listen to Joe Rogan Podcast. I watch Dexter. I’ve been lifting weights and focused on the external world. I’ve set up a one-man company Sofus Web Soluciones SCоформить кредит онлайн. I’m still working exclusively for a single client but hopefully I can get a side project rolling as soon as I finish the super amazing multisite cms platform that I’ve been developing for almost a year….


How I recovered my Archbox after deleting /boot

Written on:August 12, 2013

After 2 years of running arch, It started to feel a little clunky. Kde is giving me sound problems, dolphin is taking 10 seconds to load, etc.. I decided to give openSUSE a try. I installed it on my second drive, but after setting up grub, I accidentally overwrote the mbr on my arch drive. Ok, so now I lost access to my data. No problem, I thought. I’ll just…


Finding files recursively and opening them all at once.

Written on:July 27, 2013

I keep a log of my database schema changes and a lot of queries saved in different files and many times I forget what I named them. So it’s expected that I will have a hard time finding the file where I saved that super-long sql query!