Using BETWEEN instead of LIMIT and OFFSET proved to be a simple optimization to a troublesome slow MySQL query.

Using BETWEEN instead of LIMIT and OFFSET proved to be a simple optimization to a troublesome slow MySQL query.
Sphinx documentation doesn’t give examples nor explain how to use SOURCE-TYPE ‘field’ with Multi-Valued Attributes (sql_attr_multi). After experimenting, I discovered that a simple comma delimited list of ids populated in the the referenced field of my record_sphinx_index table does the trick!
Certain DBALs and ORMs don’t provide a functional reset method to clear out schema cruft before rebuilding tables (I’m looking at you, Django). Others like SilverStripe tip toe around your schema, appending-never-deleting, so nothing ever gets flat out broken by a rebuild. That behavior is OK with me because their scope usually…
I have been writing a lot of integration tests lately and wanted to share a quick tip about how to deal with datetime and timestamp columns in the table you are testing.
If you need to monitor a MySQL server in order to see what is happening, but you haven’t developed any monitoring solutions you can use this to grab information from the mysql server. How to grab the status and show how many “Com_inserts” are happening every 10 seconds: > mysqladmin…