Just a question. On of my websites became significant slower. Loadtimes taking over 30 seconds on 30k rows. I must say queries aren't optimized so 10k queries can be fired but still, I find this taking too long... So I figured, let's check the indexes. After viewing some of the 'problem' tables I saw I made index over multiple columns but the cardinality is only shown on 1 column and the other indexes have 0 cardinality.
Did I made wrong indexes? In other words, should I make an index for each column instead of combining them?
preguntado el 08 de noviembre de 11 a las 19:11
It's almost certainly the case that you created the wrong indexes. Most people do! :-)
There's no rule to create indexes on multiple columns vs. individual columns. The best indexes to create depends on the queries you run, not your database schema.
Analyzing the queries and deciding on indexes is a meticulous process. You can use EXPLICAR to see how a given query is using existing indexes. Be sure to read the docs: