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

Commit69c8fba

Browse files
committed
Improve performance of numeric sum(), avg(), stddev(), variance(), etc.
This patch improves performance of most built-in aggregates that formerlyused a NUMERIC or NUMERIC array as their transition type; this includesnot only aggregates on numeric inputs, but some aggregates on integerinputs where overflow of an int8 value is a possibility. The code nowuses a special-purpose data structure to avoid array construction anddeconstruction overhead, as well as packing and unpacking overhead fornumeric values.These aggregates' transition type is now declared as INTERNAL, sinceit doesn't correspond to any SQL data type. To keep the planner fromthinking that that means a lot of storage will be used, we make useof the just-added pg_aggregate.aggtransspace feature. The space estimateis set to 128 bytes, which is at least in the right ballpark.Hadi Moshayedi, reviewed by Pavel Stehule and Tomas Vondra
1 parent6cb8614 commit69c8fba

File tree

7 files changed

+362
-186
lines changed

7 files changed

+362
-186
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp