Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1afaa25

Browse files
committed
If we cannot get a real estimate for the selectivity of a range query,
use a default value that's fairly small. We were generating a resultof about 0.1, but I think 0.01 is probably better --- want to encourageuse of an indexscan in this situation.
1 parentcad764f commit1afaa25

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/backend/optimizer/path/clausesel.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.31 2000/03/17 02:36:14 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.32 2000/03/23 00:58:36 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -194,9 +194,11 @@ clauselist_selectivity(Query *root,
194194
else
195195
{
196196
/* One or both is probably a default estimate,
197-
* so punt and just merge them in generically.
197+
* so supply a default estimate for the selectivity
198+
* of the range query. We rather optimistically assume
199+
* that the range is tight...
198200
*/
199-
s1 *=rqlist->hibound*rqlist->lobound;
201+
s1 *=0.01;
200202
}
201203
}
202204
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp