@@ -186,7 +186,7 @@ SELECT (a + b) AS c FROM test_complex;
186
186
<para>
187
187
Providing NEGATOR is very helpful to the query optimizer since
188
188
it allows expressions like NOT (x = y) to be simplified into
189
- x <> y. This comes up more often than you might think, because
189
+ x <> y. This comes up more often than you might think, because
190
190
NOTs can be inserted as a consequence of other rearrangements.
191
191
</para>
192
192
@@ -225,21 +225,21 @@ SELECT (a + b) AS c FROM test_complex;
225
225
These are the standard restriction estimators:
226
226
<ProgramListing>
227
227
eqsel for =
228
- neqsel for <>
229
- intltsel for < or < =
230
- intgtsel for > or > =
228
+ neqsel for <>
229
+ intltsel for < or < =
230
+ intgtsel for > or > =
231
231
</ProgramListing>
232
232
It might seem a little odd that these are the categories, but they
233
233
make sense if you think about it. '=' will typically accept only
234
- a small fraction of the rows in a table; '<> ' will typically reject
235
- only a small fraction. '< ' will accept a fraction that depends on
234
+ a small fraction of the rows in a table; '<> ' will typically reject
235
+ only a small fraction. '< ' will accept a fraction that depends on
236
236
where the given constant falls in the range of values for that table
237
237
column (which, it just so happens, is information collected by
238
238
VACUUM ANALYZE and made available to the selectivity estimator).
239
- '< =' will accept a slightly larger fraction than '< ' for the same
239
+ '< =' will accept a slightly larger fraction than '< ' for the same
240
240
comparison constant, but they're close enough to not be worth
241
241
distinguishing, especially since we're not likely to do better than a
242
- rough guess anyhow. Similar remarks apply to '> ' and '> ='.
242
+ rough guess anyhow. Similar remarks apply to '> ' and '> ='.
243
243
</para>
244
244
245
245
<para>
@@ -249,48 +249,48 @@ SELECT (a + b) AS c FROM test_complex;
249
249
matching operators (~, ~*, etc) use eqsel on the assumption that they'll
250
250
usually only match a small fraction of the entries in a table.
251
251
</para>
252
+ </sect2>
252
253
253
- <sect2>
254
- <title>JOIN</title>
254
+ <sect2>
255
+ <title>JOIN</title>
255
256
256
- <para>
257
- The JOIN clause, if provided, names a join selectivity
258
- estimation function for the operator (note that this is a function
259
- name, not an operator name). JOIN clauses only make sense for
260
- binary operators that return boolean. The idea behind a join
261
- selectivity estimator is to guess what fraction of the rows in a
262
- pair of tables will satisfy a WHERE-clause condition of the form
263
- <ProgramListing>
257
+ <para>
258
+ The JOIN clause, if provided, names a join selectivity
259
+ estimation function for the operator (note that this is a function
260
+ name, not an operator name). JOIN clauses only make sense for
261
+ binary operators that return boolean. The idea behind a join
262
+ selectivity estimator is to guess what fraction of the rows in a
263
+ pair of tables will satisfy a WHERE-clause condition of the form
264
+ <ProgramListing>
264
265
table1.field1 OP table2.field2
265
- </ProgramListing>
266
- for the current operator. As with the RESTRICT clause, this helps
267
- the optimizer very substantially by letting it figure out which
268
- of several possible join sequences is likely to take the least work.
269
- </para>
266
+ </ProgramListing>
267
+ for the current operator. As with the RESTRICT clause, this helps
268
+ the optimizer very substantially by letting it figure out which
269
+ of several possible join sequences is likely to take the least work.
270
+ </para>
270
271
271
- <para>
272
- As before, this chapter will make no attempt to explain how to write
273
- a join selectivity estimator function, but will just suggest that
274
- you use one of the standard estimators if one is applicable:
275
- <ProgramListing>
272
+ <para>
273
+ As before, this chapter will make no attempt to explain how to write
274
+ a join selectivity estimator function, but will just suggest that
275
+ you use one of the standard estimators if one is applicable:
276
+ <ProgramListing>
276
277
eqjoinsel for =
277
- neqjoinsel for <>
278
- intltjoinsel for < or <=
279
- intgtjoinsel for > or >=
280
- </ProgramListing>
281
- </para>
278
+ neqjoinsel for <>
279
+ intltjoinsel for < or <=
280
+ intgtjoinsel for > or >=
281
+ </ProgramListing>
282
+ </para>
283
+ </sect2>
282
284
283
- </sect2>
285
+ <sect2>
286
+ <title>HASHES</title>
284
287
285
- <sect2>
286
- <title>HASHES</title>
287
-
288
- <para>
289
- The HASHES clause, if present, tells the system that it is OK to
290
- use the hash join method for a join based on this operator. HASHES
291
- only makes sense for binary operators that return boolean --- and
292
- in practice, the operator had better be equality for some data type.
293
- </para>
288
+ <para>
289
+ The HASHES clause, if present, tells the system that it is OK to
290
+ use the hash join method for a join based on this operator. HASHES
291
+ only makes sense for binary operators that return boolean --- and
292
+ in practice, the operator had better be equality for some data type.
293
+ </para>
294
294
295
295
<para>
296
296
The assumption underlying hash join is that the join operator can
0 commit comments