question- how effective are indexes when it 开发者_如何转开发comes to large tables? If you have a very very large mysql table, at what point do indexes become ineffective when it comes to searching the table?
The main purpose of an index is to prevent full scanning of a "very large" table whenever you search for a certain row so technically the larger the table gets the more "effective" the index becomes because the full scanning becomes more expensive.
The question is more if in your case the table scan without index is faster then using a index. So just do both, and let a profiler decide how fast it is. In normal circumstances indexes speed up the SELECT statements at all when your select records with WHERE parameters. If you select always the whole data (all lines) then you don't need indexes.
精彩评论