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
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. Continue reading “Mysql: Repair all tables in a database with a couple of commands in Linux” »
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! Continue reading “Finding files recursively and opening them all at once.” »
On May 25, 2012, I took Part II of the Mysql 5.0 Developer Certified Profesional Exam. I thought the second exam was easier than the first one, Maybe it’s because I actually studied this time! Continue reading “Oracle Certified Profesional, Mysql 5.0 Developer” »