Tag: mysql

Import MySQL Dump Fast(er)

Part of software testing at times we need mock database which can be easily obtained from production database using a simple mysqldump command. However, the import of the mysql dump into our local mysql server could painstakingly slow especially when the import file is large. If the tables are of InnoDB, we can speed up […]

MySQL Profiling

If we ever wondered what’s the performance of a MySQL query and a SELECT query be more efficient (and hence faster)? MySQL has an embedded profiling feature that we can use from stock MySQL. To enable it, it’s pretty simple: mysql> SET profiling = 1;

How to export a big MySQL database?

If you have large production MySQL database that you wish to backup or replicate for testing, it is important to handle the export gently :) For me, I use mysqldump. Remember that you must include several optional flags, which will speed up the export and most importantly avoid stressing your production MySQL. mysqldump -u[username] -p[password] […]