@@ -171,28 +171,27 @@ storage efficiently in such situations.
171
171
previously separate field was indexed, this eliminates an extra index,
172
172
too.
173
173
174
- - Use small field names. This is recommended only in certain situations.
174
+ - Use shorter field names. This is recommended only in certain situations.
175
175
176
- Consider the following record:
176
+ For example, the strings ``last_name`` and ``best_score`` in this
177
+ record:
177
178
178
179
.. code-block:: javascript
179
180
180
181
{ last_name : "Smith", best_score: 3.9 }
181
182
182
- The strings ``last_name `` and ``best_score`` are stored in each
183
- object's BSON. Using shorter strings would save space :
183
+ could be shortened to ``lname `` and ``score``, which would save 9
184
+ bytes per document :
184
185
185
186
.. code-block:: javascript
186
187
187
188
{ lname : "Smith", score : 3.9 }
188
189
189
- In this case, the shorter names would save 9 bytes per document. This
190
- reduces expressiveness and is not recommended unless you have a
191
- collection where this is of significant concern.
192
-
193
- Shortening field names does not reduce index size. Field names are not
194
- stored in indexes, as indexes have a predefined structure. In general
195
- it is not necessary to use short field names.
190
+ Shortening field names reduces expressiveness and is not recommended
191
+ unless you have a collection where document overhead is of significant
192
+ concern. Also, shortening field names does not reduce index size, as
193
+ indexes have a predefined structure. In general it is not necessary to
194
+ use short field names.
196
195
197
196
- Embed documents.
198
197
0 commit comments