@@ -4,15 +4,15 @@ msgstr ""
4
4
"Project-Id-Version : mongodb-manual 2.6\n "
5
5
"Report-Msgid-Bugs-To : \n "
6
6
"POT-Creation-Date : 2014-09-03 15:39-0400\n "
7
- "PO-Revision-Date : 2015-01-28 19:02 +0800\n "
7
+ "PO-Revision-Date : 2015-11-27 23:19 +0800\n "
8
8
"
Last-Translator :
cwfan <[email protected] >\n "
9
- "
Language-Team :
LANGUAGE <[email protected] >\n "
10
9
"MIME-Version : 1.0\n "
11
10
"Content-Type : text/plain; charset=UTF-8\n "
12
11
"Content-Transfer-Encoding : 8bit\n "
13
12
"Plural-Forms : nplurals=1; plural=0;\n "
14
13
"Language : zh_CN\n "
15
- "X-Generator : Poedit 1.7.3\n "
14
+ "X-Generator : Poedit 1.8.6\n "
15
+ "Language-Team : \n "
16
16
17
17
#: ../source/faq/indexes.txt:3
18
18
msgid "FAQ: Indexes"
@@ -29,22 +29,22 @@ msgid ""
29
29
"List <https://groups.google.com/forum/?fromgroups#!forum/mongodb-user>`_. "
30
30
"See also :doc:`/administration/indexes`."
31
31
msgstr ""
32
- "如果没有找到你想要的答案,请查看 :doc:`complete list of FAQs </faq>` 或者把你 "
33
- "的问题提交到 `MongoDB User Mailing List <https://groups.google.com/forum/?"
34
- "fromgroups#!forum/mongodb-user>`_ 。 请参见 :doc:`/administration/"
32
+ "如果没有找到你想要的答案,请查看 :doc:`complete list of FAQs </faq>` 或者把 "
33
+ "你的问题提交到 `MongoDB User Mailing List <https://groups.google.com/forum/?"
34
+ "fromgroups#!forum/mongodb-user>`_ 。 也可以参考 :doc:`/administration/"
35
35
"indexes` 。"
36
36
37
37
#: ../source/faq/indexes.txt:15
38
38
msgid "Should you run ``ensureIndex()`` after every insert?"
39
- msgstr "你是否每次安装完都要执行 ``ensureIndex()`` ?"
39
+ msgstr "是否需要在每次写入数据后都运行 ``ensureIndex()`` ?"
40
40
41
41
#: ../source/faq/indexes.txt:17
42
42
msgid ""
43
43
"No. You only need to create an index once for a single collection. After "
44
44
"initial creation, MongoDB automatically updates the index as data changes."
45
45
msgstr ""
46
- "现在只需在首次创建的时候为单集合创建一次索引,MongoDB会在数据修改时自动更新 "
47
- "索引 "
46
+ "不需要,对于单个集合你只需要创建一次索引。在创建完成后,MongoDB会随着数据改 "
47
+ "变而自动更新索引。 "
48
48
49
49
#: ../source/faq/indexes.txt:21
50
50
msgid ""
@@ -55,22 +55,23 @@ msgid ""
55
55
"inaccessible as the index creation is happening. See :ref:`index-building-"
56
56
"replica-sets`."
57
57
msgstr ""
58
- "通常当执行完 :method:`~db.collection.ensureIndex()` ,索引还不存在,因为后台"
59
- "的工作还在进行中, 这时如果调用 :method:`~db.collection.ensureIndex()` 将破坏"
60
- "数据库的完整性, 创建索引时可以执行 :method:`~db.collection.ensureIndex()` "
61
- "使复制集无法访问。 参见 :ref:`index-building-replica-sets` 。"
58
+ "尽管通常情况下执行 :method:`~db.collection.ensureIndex()` 是没有问题的,但是"
59
+ "如果一个索引因为持续运行的后台管理工作而没有生成, 这时如果调用 :method:`~db."
60
+ "collection.ensureIndex()` 将破坏数据库的可用性。运行命令 :method:`~db."
61
+ "collection.ensureIndex()` 创建索引期间复制集会无法读写。 参见 :ref:`index-"
62
+ "building-replica-sets` 。"
62
63
63
64
#: ../source/faq/indexes.txt:29
64
65
msgid "How do you know what indexes exist in a collection?"
65
- msgstr "如何查看集合中已有的索引 ?"
66
+ msgstr "如何查看集合中已存在哪些索引 ?"
66
67
67
68
#: ../source/faq/indexes.txt:31
68
69
msgid ""
69
70
"To list a collection's indexes, use the :method:`db.collection."
70
71
"getIndexes()` method or a similar :api:`method for your driver <>`."
71
72
msgstr ""
72
- "使用 :method:`db.collection.getIndexes()` 方法或类似的 :api:`method for your "
73
- "driver <>` 。"
73
+ "使用 :method:`db.collection.getIndexes()` 方法或你所使用的驱动上的类似 :api:"
74
+ "`method for your driver <>` 可以列出一个集合上的已创建的所有索引 。"
74
75
75
76
#: ../source/faq/indexes.txt:36
76
77
msgid "How do you determine the size of an index?"
@@ -80,11 +81,12 @@ msgstr "你要如何确定索引的大小?"
80
81
msgid ""
81
82
"To check the sizes of the indexes on a collection, use :method:`db."
82
83
"collection.stats()`."
83
- msgstr "检查集合的索引大小,使用 :method:`db.collection.stats()` 。"
84
+ msgstr ""
85
+ "使用命令 :method:`db.collection.stats()` 可以检查集合上的索引所占空间大小。"
84
86
85
87
#: ../source/faq/indexes.txt:43
86
88
msgid "What happens if an index does not fit into RAM?"
87
- msgstr "如果索引不匹配内存会空间发生什么 ?"
89
+ msgstr "如果索引不能被装载到内存空间会发生什么 ?"
88
90
89
91
#: ../source/faq/indexes.txt:45
90
92
msgid ""
@@ -93,34 +95,34 @@ msgid ""
93
95
"mind an index fits into RAM when your server has RAM available for the "
94
96
"index combined with the rest of the :term:`working set`."
95
97
msgstr ""
96
- "如果索引过大而不匹配RAM,则MongoDB必须从硬盘读取索引,而硬盘读取索引要远比从 "
97
- "内存读取慢得多。记住,索引匹配的内存包含你的服务器可用于索引的内存空间和剩余 "
98
- "的 :term:`working set` "
98
+ "如果索引所占存储空间过大而不能被加载到内存中,MongoDB必须从硬盘读取索引,而 "
99
+ "硬盘读取索引要远比从内存读取慢得多。注意,索引匹配内存是指你的服务器对索引和 "
100
+ "其它工作集的组合有足够的可用内存空间 :term:`working set` "
99
101
100
102
#: ../source/faq/indexes.txt:50
101
103
msgid ""
102
104
"In certain cases, an index does not need to fit *entirely* into RAM. For "
103
105
"details, see :ref:`indexing-right-handed`."
104
106
msgstr ""
105
- "在某些情况下,索引不必 *完全* 匹配RAM ,详细内容参见 :ref:`indexing-right-"
107
+ "在某些情况下,索引不必 *完全* 加载到RAM ,详细内容参见 :ref:`indexing-right-"
106
108
"handed` 。"
107
109
108
110
#: ../source/faq/indexes.txt:56
109
111
msgid "How do you know what index a query used?"
110
- msgstr "如何知道查询使用了哪个索引 ?"
112
+ msgstr "如何知道一次查询使用了哪个索引 ?"
111
113
112
114
#: ../source/faq/indexes.txt:58
113
115
msgid ""
114
116
"To inspect how MongoDB processes a query, use the :method:`~cursor."
115
117
"explain()` method in the :program:`mongo` shell, or in your application "
116
118
"driver."
117
119
msgstr ""
118
- "要检查MongoDB是如何处理查询 ,在 :program:`mongo` 控制台或者通过你的驱动程序 "
120
+ "要观察MongoDB是如何处理查询 ,在 :program:`mongo` shell或在你使用的应用驱动中 "
119
121
"调用 :method:`~cursor.explain()` 。"
120
122
121
123
#: ../source/faq/indexes.txt:63
122
124
msgid "How do you determine what fields to index?"
123
- msgstr "如何确定哪个字段要用索引 ?"
125
+ msgstr "如何确定在哪些字段上建立索引 ?"
124
126
125
127
#: ../source/faq/indexes.txt:65
126
128
msgid ""
@@ -130,6 +132,9 @@ msgid ""
130
132
"support all the fields in a given query. For detailed documentation on "
131
133
"choosing which fields to index, see :doc:`/administration/indexes`."
132
134
msgstr ""
135
+ "许多因素会决定你在哪些字段上建立索引,包括 :ref:`selectivity <index-"
136
+ "selectivity>` ,内存适配,尽可能地在多个查询中重用索引,和支持给定查询中的所"
137
+ "有字段。更详细的文档参见 :doc:`/administration/indexes` 。"
133
138
134
139
#: ../source/faq/indexes.txt:81
135
140
msgid "How do write operations affect indexes?"
@@ -143,15 +148,15 @@ msgid ""
143
148
"must update all indexes that include this document as part of the update "
144
149
"operation."
145
150
msgstr ""
146
- "任何更新索引字段的写操作必须更新索引自己而不是文档,如果你更新了一份文档,"
147
- "使文档增长超过所分配的记录大小,该更新操作将导致文档中的全部索引更新。"
151
+ "任何改变索引中字段的写操作都会既修改文档本身也更新索引。如果你对文档的更新操"
152
+ "作导致文档大小超出了已分配的记录大小,那么MongoDB不仅会修改这个文档,还会更"
153
+ "新所有的索引。"
148
154
149
155
#: ../source/faq/indexes.txt:89
150
156
msgid ""
151
157
"Therefore, if your application is write-heavy, creating too many indexes "
152
158
"might affect performance."
153
- msgstr ""
154
- "因此,如果你的程序写操作非常多,创建过多的索引可能会影响性能。"
159
+ msgstr "因此,如果你的程序写操作非常多,创建过多的索引可能会影响性能。"
155
160
156
161
#: ../source/faq/indexes.txt:93
157
162
msgid "Will building a large index affect database performance?"
@@ -165,13 +170,17 @@ msgid ""
165
170
"large collection, consider building the index in the background. See :ref:"
166
171
"`index-creation-operations`."
167
172
msgstr ""
168
- "建立索引可能是一个IO密集型操作,特别是如果你有一个巨大的集合"
173
+ "建立索引是一个IO密集型操作,特别是当你的集合很大的时候。包括MySQL在内的所有支"
174
+ "持辅助索引的数据库系统都有这种情况。如果你需要在一个大集合上建立索引,可以考"
175
+ "虑在后台建立它。参考 :ref:`index-creation-operations` 。"
169
176
170
177
#: ../source/faq/indexes.txt:101
171
178
msgid ""
172
179
"If you build a large index without the background option, and if doing so "
173
180
"causes the database to stop responding, do one of the following:"
174
181
msgstr ""
182
+ "如果你创建一个大索引而且没有选择在后台运行,这时如果导致数据库没有响应,可以"
183
+ "按照如下方式解决:"
175
184
176
185
#: ../source/faq/indexes.txt:105
177
186
msgid "Wait for the index to finish building."
@@ -181,7 +190,7 @@ msgstr "等待索引构建完成。"
181
190
msgid ""
182
191
"Kill the current operation (see :method:`db.killOp()`). The partial index "
183
192
"will be deleted."
184
- msgstr "中断当前的操作(参见 :method:`db.killOp()`),部分索引将被删除。"
193
+ msgstr "中断当前的操作(参见 :method:`db.killOp()` ),部分索引将被删除。"
185
194
186
195
#: ../source/faq/indexes.txt:113
187
196
msgid "Can I use index keys to constrain query matches?"
@@ -194,19 +203,21 @@ msgid ""
194
203
"collection.find()` by using index keys."
195
204
msgstr ""
196
205
"你可以使用 :method:`~cursor.min()` 和 :method:`~cursor.max()` 方法通过索引键"
197
- "来约束从 :method:`~db.collection.find()` 获取的结果 。"
206
+ "来限制 :method:`~db.collection.find()` 返回的游标的结果集 。"
198
207
199
208
#: ../source/faq/indexes.txt:120
200
209
msgid "Using ``$ne`` and ``$nin`` in a query is slow. Why?"
201
- msgstr "为什么在查询中使用 ``$ne`` 和 ``$nin`` 很慢 ?"
210
+ msgstr "为什么使用 ``$ne`` 和 ``$nin`` 会导致查询很慢 ?"
202
211
203
212
#: ../source/faq/indexes.txt:122
204
213
msgid ""
205
214
"The :query:`$ne` and :query:`$nin` operators are not selective. See :ref:"
206
215
"`index-selectivity`. If you need to use these, it is often best to make "
207
216
"sure that an additional, more selective criterion is part of the query."
208
217
msgstr ""
209
-
218
+ " :query:`$ne` 和 :query:`$nin` 操作不是好的选择。 参见 :ref:`index-"
219
+ "selectivity` 。如果你需要使用它们,最好在查询语句中添加额外的更精挑细选的规"
220
+ "范。"
210
221
211
222
#: ../source/faq/indexes.txt:128
212
223
msgid "Can I use a multi-key index to support a query for a whole array?"
@@ -219,6 +230,8 @@ msgid ""
219
230
"all subsequent items in the array cannot use the index and must scan the "
220
231
"documents individually."
221
232
msgstr ""
233
+ "不完全可行。索引可以部分地支持这种查询,因为索引可以加快数组第一个元素的选"
234
+ "择,但是不能用索引去比较数组中所有后续的元素,只能通过单独地扫描文档来完成。"
222
235
223
236
#: ../source/faq/indexes.txt:136
224
237
msgid "How can I effectively use indexes strategy for attribute lookups?"
@@ -231,17 +244,20 @@ msgid ""
231
244
"where each document has a field (e.g. ``attrib`` ) that holds a specific "
232
245
"type of attribute. You can index this ``attrib`` field."
233
246
msgstr ""
247
+ "对于不需要对结果集进行排序的查询或范围查询,可以考虑创建一个字段,这个字段包"
248
+ "含一个由文档组成的数组,数组中每一个文档都有一个保存指定类型属性的字段(比如 "
249
+ "``attrib`` )。你可以索引 ``attrib`` 字段。"
234
250
235
251
#: ../source/faq/indexes.txt:144
236
252
msgid ""
237
253
"For example, the ``attrib`` field in the following document allows you to "
238
254
"add an unlimited number of attributes types:"
239
- msgstr "例如,下文中的字段 ``attrib`` 允许你添加不限数量的属性类型:"
255
+ msgstr "例如,下面文档中的字段 ``attrib`` 允许你添加不限数量的属性类型:"
240
256
241
257
#: ../source/faq/indexes.txt:158
242
258
msgid ""
243
259
"*Both* of the following queries could use the same ``{ \" attrib.k\" : 1, "
244
260
"\" attrib.v\" : 1 }`` index:"
245
261
msgstr ""
246
- "下面的*全部*查询都可以使用同样的 ``{ \" attrib.k\" : 1, \" attrib.v\" : 1 }`` "
247
- "索引 :"
262
+ "下面的 *两个* 查询都可以使用同样的索引 ``{ \" attrib.k\" : 1, \" attrib.v\" : "
263
+ "1 }`` :"
0 commit comments