关于索引的一般问题 [英] General Question about indexing
问题描述
我应该只索引1个字段吗?一些?或者我可以有效索引的所有字段?
许多来源声明索引可以加快常用字段的时间,但索引所有字段是否有缺点?
大多数消息来源说使用索引使数据库更有效率,但他们没有说明如何正确实现它们。
我相信经验法则是索引搜索所需的任何字段。否则,索引不需要的字段只会减慢数据库的速度,因为每次更新记录时,所有索引都必须更新。
只需要我的2美分......
Should I only index 1 field? a few? or all fields that I can availably index?
Many Sources state that indexing can speed up the time for commonly used fields, but is there a drawback to indexing all fields?
Most sources say that using indexing makes database more efficient, but they do not say how to properly implement them.
Hi,
I believe the rule of thumb is to index any field you need for searching. Otherwise, indexing unneeded fields would just slow down the database because every time you update a record, all index will have to be updated also.
Just my 2 cents...
这篇关于关于索引的一般问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!