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

Commit301194f

Browse files
committed
Reduce the scaling factor for attstattarget to number-of-lexemes from 100
to 10, to compensate for the recent change in default statistics target.The original number was pulled out of the air anyway :-(, but it was pickedin the context of the old default, so holding the default size of theMCELEM array constant seems the best thing. Per discussion.
1 parentb4d64a6 commit301194f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/backend/tsearch/ts_typanalyze.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/ts_typanalyze.c,v 1.4 2008/12/13 19:13:44 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/ts_typanalyze.c,v 1.5 2008/12/15 15:06:31 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -105,7 +105,7 @@ ts_typanalyze(PG_FUNCTION_ARGS)
105105
*is no more than a few times w.
106106
*
107107
*We use a hashtable for the D structure and a bucket width of
108-
*statistics_target *100, where100 is an arbitrarily chosen constant,
108+
*statistics_target *10, where10 is an arbitrarily chosen constant,
109109
*meant to approximate the number of lexemes in a single tsvector.
110110
*/
111111
staticvoid
@@ -130,8 +130,8 @@ compute_tsvector_stats(VacAttrStats *stats,
130130
LexemeHashKeyhash_key;
131131
TrackItem*item;
132132

133-
/* We want statistics_target *100 lexemes in the MCELEM array */
134-
num_mcelem=stats->attr->attstattarget*100;
133+
/* We want statistics_target *10 lexemes in the MCELEM array */
134+
num_mcelem=stats->attr->attstattarget*10;
135135

136136
/*
137137
* We set bucket width equal to the target number of result lexemes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp