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

Commit85efd5f

Browse files
committed
Reduce hash size for compute_array_stats, compute_tsvector_stats.
The size is only a hint, but a big hint chews up a lot of memory withoutapparently improving performance much.Analysis and patch by Noah Misch.
1 parent9d435d5 commit85efd5f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/backend/tsearch/ts_typanalyze.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ compute_tsvector_stats(VacAttrStats *stats,
186186
hash_ctl.match=lexeme_match;
187187
hash_ctl.hcxt=CurrentMemoryContext;
188188
lexemes_tab=hash_create("Analyzed lexemes table",
189-
bucket_width*7,
189+
num_mcelem,
190190
&hash_ctl,
191191
HASH_ELEM |HASH_FUNCTION |HASH_COMPARE |HASH_CONTEXT);
192192

‎src/backend/utils/adt/array_typanalyze.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ compute_array_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
282282
elem_hash_ctl.match=element_match;
283283
elem_hash_ctl.hcxt=CurrentMemoryContext;
284284
elements_tab=hash_create("Analyzed elements table",
285-
bucket_width*7,
285+
num_mcelem,
286286
&elem_hash_ctl,
287287
HASH_ELEM |HASH_FUNCTION |HASH_COMPARE |HASH_CONTEXT);
288288

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp