|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/optimizer/path/clausesel.c,v 1.61 2003/11/2919:51:50 pgsql Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/optimizer/path/clausesel.c,v 1.62 2003/12/2921:44:49 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -108,6 +108,10 @@ restrictlist_selectivity(Query *root,
|
108 | 108 | * If the calculation yields zero or negative, however, we chicken out and
|
109 | 109 | * use a default estimate; that probably means that one or both
|
110 | 110 | * selectivities is a default estimate rather than an actual range value.
|
| 111 | + * |
| 112 | + * A free side-effect is that we can recognize redundant inequalities such |
| 113 | + * as "x < 4 AND x < 5"; only the tighter constraint will be counted. |
| 114 | + * |
111 | 115 | * Of course this is all very dependent on the behavior of
|
112 | 116 | * scalarltsel/scalargtsel; perhaps some day we can generalize the approach.
|
113 | 117 | */
|
|