Fernando Ipar
"Tell my wife I love her very much, she knows"
how to prevent explain from executing subqueries
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...
Generating data with dbmonster
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....
Indexing text columns in MySQL
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 |...
iptables trick to limit concurrent tcp connections
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...
SOUNDEX(), triggers, and stored procedures
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...