Tag Archives: mysql

mySQL: OR, UNION and UNION ALL

I was doing some SQL tuning on mySQL today and I learned a few interesting things. Let’s take an example of a simple query where we have an OR of two mutually exclusive conditions, each on indexed columns. SELECT * FROM   t1 WHERE  user_id = 1 OR     location_id = 2; In mySQL there is a [...]

MySQL Disaster Recovery…

Within a couple of weeks of doing our disaster recovery testing we’ve had a number of disasters, one of which was our Bugzilla server. The recovery was pretty sweet. The database engine (mySQL) was loaded as part of the Linux install and recovering the database was done with one command: mysql -u root –password=”myPassword” bugs [...]