So I have a table with two indexes, one on a VARCHAR field (url) and one on an INT field (id). If I do a query on either of those fields using a WHERE condition with the usual =, the index is used in both cases. But for LIKE queries, the following uses the index:
SELECT * FROM user WHERE url LIKE 'somevalue';
But this one does not:
SELECT * FROM user WHERE id LIKE 1;
Is there an explanation somewhere in the docs for this or does anyone have any ideas why this is so?