BLOG

Technical tips collected over several decades in IT

Use FORCE INDEX

Just putting this here as I have a SELECT in MySQL that was taking 1.946 sec to return 20 records from a table with 159884 records when using a ORDER BY DESC on a DATETIME field Creating an index and changing the FROM to FORCE INDEX () dropped it down to 0.00079 sec /...

MySQL Backup to Email or Disk Script

If you run mysqldump --all-databases you get one monolithic file which can be a pain when trying to restore one database. So it's nice to call mysqldump dbname so you get individual database backup files. To call mysqldump for each database requires that you either...

Login

Blog History