最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
3.37.1. Extra expenses ¶
Each index occupies a certain amount of storage space, and it is also necessary to operate on the index during insert, update and delete operations. Therefore, if you rarely read the collection, it is recommended that you do not use the index.
3.37.2. Memory (RAM) usage ¶
Since the index is stored in RAM, you should make sure that the size of the index does not exceed the memory limit.
If the size of the index is larger than the memory limit, MongoDB will delete some indexes, which will cause performance degradation.
3.37.3. Query restriction ¶
The index cannot be used by the following query:
Regular expressions and non-operators, such as $nin, $not, etc.
Arithmetic operators, such as $mod, etc.
$where clause
Therefore, it is a good habit to check whether your statement uses an index, which can be checked with explain.
3.37.4. Index key limit ¶
从2.6版本开始,如果现有的索引字段的值超过索引键的限制,MongoDB中不会创建索引。
3.37.5. Insert document exceeds index key limit ¶
If the value of the index field of a document exceeds the limit of the index key, MongoDB does not convert any document into a collection of indexes. Similar to mongorestore and mongoimport tools.
3.37.6. Maximum range ¶
Cannot have more than 64 indexes in the collection
The length of the index name cannot exceed 128 characters
A composite index can have up to 31 fields