开发者

Mysql index for large tables ( more than 10 million rows)

开发者 https://www.devze.com 2023-03-27 14:38 出处:网络
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 th

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消