Commit 301194f8 authored by Tom Lane's avatar Tom Lane

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 picked
in the context of the old default, so holding the default size of the
MCELEM array constant seems the best thing.  Per discussion.
parent b4d64a6d
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/ts_typanalyze.c,v 1.4 2008/12/13 19:13:44 tgl Exp $ * $PostgreSQL: pgsql/src/backend/tsearch/ts_typanalyze.c,v 1.5 2008/12/15 15:06:31 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -105,7 +105,7 @@ ts_typanalyze(PG_FUNCTION_ARGS) ...@@ -105,7 +105,7 @@ ts_typanalyze(PG_FUNCTION_ARGS)
* is no more than a few times w. * is no more than a few times w.
* *
* We use a hashtable for the D structure and a bucket width of * We use a hashtable for the D structure and a bucket width of
* statistics_target * 100, where 100 is an arbitrarily chosen constant, * statistics_target * 10, where 10 is an arbitrarily chosen constant,
* meant to approximate the number of lexemes in a single tsvector. * meant to approximate the number of lexemes in a single tsvector.
*/ */
static void static void
...@@ -130,8 +130,8 @@ compute_tsvector_stats(VacAttrStats *stats, ...@@ -130,8 +130,8 @@ compute_tsvector_stats(VacAttrStats *stats,
LexemeHashKey hash_key; LexemeHashKey hash_key;
TrackItem *item; TrackItem *item;
/* We want statistics_target * 100 lexemes in the MCELEM array */ /* We want statistics_target * 10 lexemes in the MCELEM array */
num_mcelem = stats->attr->attstattarget * 100; num_mcelem = stats->attr->attstattarget * 10;
/* /*
* We set bucket width equal to the target number of result lexemes. * We set bucket width equal to the target number of result lexemes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment