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 [...]
Making use of procedure analyse()
SELECT Field0[,Field1,Field2,...] FROM TABLE PROCEDURE ANALYSE() is a nice tool to find out more about your table’s columns.
Still, it could be improved in a lot of ways, and the stored procedure below is a starting point. It makes use of procedure analyse (though with ‘SELECT * FROM’), and modifies it’s output to include the actual [...]
