Here's a quick tip for using explain: You may know this already, but mysql will actually execute some subqueries when you invoke explain.  Here's an example: mysql> explain select id from projects where id = (select max(id) from projects where name like 'en%'); +----+-------------+----------+-------+---------------+---------+---------+-------+-------+-------------+ | id | select_type | table...

In my last post I included some sample data which was useful for playing around with queries That sample data was generated with dbmonster, a nice tool I discovered recently which comes in handy when you need to populate a database table to test your queries, the engine, schema, etc....

This time, I'm talking about indexes for string typed columns. In particular, I'll show a procedure I find useful while looking for good index length values for these columns. I'll use a sample table called people. Here's what it looks like: mysql> desc people; +------------+------------------+------+-----+---------+----------------+ | Field | Type |...

This is sort of a self-documenting post, and a self-support group about ill-behaved tomcat apps. Sometimes, you have multiple nodes accesing your MySQL server (or any kind of server, for that matter) concurrently. Eventually, software in one or more of these nodes might do nasty things (you know who you...

MySQL provides a SOUNDEX() function, which returns the soundex of a given string. For details, refer to the manual, but to put it simply, it allows you to compare strings based on how they sound, hence letting you do proximity searches on your database. If you're just querying for a...