In MySQL, how to build index to speed up this query?
In MySQL, how to build index to speed up this query? SELECT c1, c2 FROM t WHERE c3='foobar'; To really give a answer it would be useful to see if you have existing indexes already, but... All this is assuming table 't' exists and you need to add an index and you only currently have a single index on your primary key or no indexes at all. A covering index for the query will give best performance for your needs, but with any index you sacrifice some insertion speed. How much that sacrifice matters depends on your application's profile. If you read mostly from the table it won't matter much. If