@@ -126,111 +126,63 @@ ____________________________________________________________________________-->
126
126
</para>
127
127
128
128
<table id="gin-builtin-opclasses-table">
129
- <!--==========================orignal english content==========================
130
- <title>Built-in <acronym>GIN</acronym> Operator Classes</title>
131
- ____________________________________________________________________________-->
132
129
<title>内建<acronym>GIN</acronym>操作符类</title>
133
- <tgroup cols="3 ">
130
+ <tgroup cols="2 ">
134
131
<thead>
135
- <!--==========================orignal english content==========================
136
132
<row>
137
133
<entry>Name</entry>
138
- <entry>Indexed Data Type</entry>
139
134
<entry>Indexable Operators</entry>
140
135
</row>
141
- ____________________________________________________________________________-->
142
- <row>
143
- <entry>名称</entry>
144
- <entry>索引数据类型</entry>
145
- <entry>可索引操作符</entry>
146
- </row>
147
136
</thead>
148
137
<tbody>
149
- <!--==========================orignal english content==========================
150
138
<row>
151
- <entry><literal>array_ops</literal></entry>
152
- <entry><type>anyarray</type></entry>
153
- <entry>
154
- <literal>&&</literal>
155
- <literal><@</literal>
156
- <literal>=</literal>
157
- <literal>@></literal>
158
- </entry>
139
+ <entry morerows="3" valign="middle"><literal>array_ops</literal></entry>
140
+ <entry><literal>&& (anyarray,anyarray)</literal></entry>
159
141
</row>
160
- ____________________________________________________________________________-->
161
142
<row>
162
- <entry><literal>array_ops</literal></entry>
163
- <entry><type>anyarray</type></entry>
164
- <entry>
165
- <literal>&&</literal>
166
- <literal><@</literal>
167
- <literal>=</literal>
168
- <literal>@></literal>
169
- </entry>
143
+ <entry><literal>@> (anyarray,anyarray)</literal></entry>
170
144
</row>
171
- <!--==========================orignal english content==========================
172
145
<row>
173
- <entry><literal>jsonb_ops</literal></entry>
174
- <entry><type>jsonb</type></entry>
175
- <entry>
176
- <literal>?</literal>
177
- <literal>?&</literal>
178
- <literal>?|</literal>
179
- <literal>@></literal>
180
- <literal>@?</literal>
181
- <literal>@@</literal>
182
- </entry>
146
+ <entry><literal><@ (anyarray,anyarray)</literal></entry>
183
147
</row>
184
- ____________________________________________________________________________-->
185
148
<row>
186
- <entry><literal>jsonb_ops</literal></entry>
187
- <entry><type>jsonb</type></entry>
188
- <entry>
189
- <literal>?</literal>
190
- <literal>?&</literal>
191
- <literal>?|</literal>
192
- <literal>@></literal>
193
- <literal>@?</literal>
194
- <literal>@@</literal>
195
- </entry>
149
+ <entry><literal>= (anyarray,anyarray)</literal></entry>
196
150
</row>
197
- <!--==========================orignal english content==========================
198
151
<row>
199
- <entry><literal>jsonb_path_ops</literal></entry>
200
- <entry><type>jsonb</type></entry>
201
- <entry>
202
- <literal>@></literal>
203
- <literal>@?</literal>
204
- <literal>@@</literal>
205
- </entry>
152
+ <entry morerows="5" valign="middle"><literal>jsonb_ops</literal></entry>
153
+ <entry><literal>@> (jsonb,jsonb)</literal></entry>
206
154
</row>
207
- ____________________________________________________________________________-->
208
155
<row>
209
- <entry><literal>jsonb_path_ops</literal></entry>
210
- <entry><type>jsonb</type></entry>
211
- <entry>
212
- <literal>@></literal>
213
- <literal>@?</literal>
214
- <literal>@@</literal>
215
- </entry>
156
+ <entry><literal>@? (jsonb,jsonpath)</literal></entry>
216
157
</row>
217
- <!--==========================orignal english content==========================
218
158
<row>
219
- <entry><literal>tsvector_ops</literal></entry>
220
- <entry><type>tsvector</type></entry>
221
- <entry>
222
- <literal>@@</literal>
223
- <literal>@@@</literal>
224
- </entry>
159
+ <entry><literal>@@ (jsonb,jsonpath)</literal></entry>
160
+ </row>
161
+ <row>
162
+ <entry><literal>? (jsonb,text)</literal></entry>
163
+ </row>
164
+ <row>
165
+ <entry><literal>?| (jsonb,text[])</literal></entry>
166
+ </row>
167
+ <row>
168
+ <entry><literal>?& (jsonb,text[])</literal></entry>
169
+ </row>
170
+ <row>
171
+ <entry morerows="2" valign="middle"><literal>jsonb_path_ops</literal></entry>
172
+ <entry><literal>@> (jsonb,jsonb)</literal></entry>
173
+ </row>
174
+ <row>
175
+ <entry><literal>@? (jsonb,jsonpath)</literal></entry>
176
+ </row>
177
+ <row>
178
+ <entry><literal>@@ (jsonb,jsonpath)</literal></entry>
179
+ </row>
180
+ <row>
181
+ <entry morerows="1" valign="middle"><literal>tsvector_ops</literal></entry>
182
+ <entry><literal>@@ (tsvector,tsquery)</literal></entry>
225
183
</row>
226
- ____________________________________________________________________________-->
227
184
<row>
228
- <entry><literal>tsvector_ops</literal></entry>
229
- <entry><type>tsvector</type></entry>
230
- <entry>
231
- <literal>@@</literal>
232
- <literal>@@@</literal>
233
- </entry>
185
+ <entry><literal>@@@ (tsvector,tsquery)</literal></entry>
234
186
</row>
235
187
</tbody>
236
188
</tgroup>
@@ -831,14 +783,14 @@ ____________________________________________________________________________-->
831
783
</para>
832
784
____________________________________________________________________________-->
833
785
<para>
834
- 更新一个 <acronym>GIN</acronym>索引可能会比较慢,这是因为倒排索引的天然特性造成的 :
835
- 对一个堆行的插入或更新可能导致对索引的很多次插入(每一次插入用于从被索引项中抽取的一个键 )。
836
- 从<productname>PostgreSQL</productname> 8.4 开始,< acronym>GIN</acronym>可以通过将新元组插入到一个临时的未排序的待处理条目列表中来推迟很多这种工作 。
837
- 当表被清理、自动分析、 <function>gin_clean_pending_list</function>函数被调用
838
- 或者待处理列表变得大于 <xref linkend="guc-gin-pending-list-limit"/>时,
839
- 这些条目被使用初始索引创建时使用的批量插入技术移动到主 <acronym>GIN</acronym>数据结构中。
840
- 这大幅度提高了 <acronym>GIN</acronym>索引的更新速度,虽然带了一些额外的清理负荷 。
841
- 此外,这些开销可以通过用一个后台进程来取代一个前台进程执行 。
786
+ 更新 <acronym>GIN</acronym> 索引往往会很慢,由于反向索引的固有特性 :
787
+ 插入或更新一个heap row 会导致许多项目插入到索引中(每个索引键从索引项目中提取一个 )。
788
+ < acronym>GIN</acronym> 能够通过将新的tuple 插入临时的未排序的待处理条目列表来延迟大部分工作 。
789
+ 当表被清理或自动分析时,或者 <function>gin_clean_pending_list</function> 函数被调用时,
790
+ 又或者待处理列表变得大于 <xref linkend="guc-gin-pending-list-limit"/>时,
791
+ 使用在初始索引建立期间使用的相同批次插入技术将项目移动到主要的 <acronym>GIN</acronym>数据结构中。
792
+ 即使考虑到额外的清理开销,这也显着加快了 <acronym>GIN</acronym>索引更新速度 。
793
+ 此外,后台进程可以执行这种开销工作,而不是前端查询处理来完成 。
842
794
</para>
843
795
844
796
<!--==========================orignal english content==========================
@@ -933,7 +885,8 @@ ____________________________________________________________________________-->
933
885
</para>
934
886
____________________________________________________________________________-->
935
887
<para>
936
- 从<productname>PostgreSQL</productname> 8.4 开始,这个建议已经不再需要了,因为可以使用延迟索引(详见<xref linkend="gin-fast-update"/>)。但是对于非常大量的更新,还是最好先删除再重建索引。
888
+ 当 <acronym>GIN</acronym> 启用 <literal>fastupdate</literal> 时
889
+ (参见 <xref linkend="gin-fast-update"/> ), 惩罚比其他情况要小。但是对于非常大的更新,删除并重新创建索引可能仍然是最好的。
937
890
</para>
938
891
</listitem>
939
892
</varlistentry>
0 commit comments