Skip to content
Snippets Groups Projects
  • Neil Conway's avatar
    be2f825d
    Apply the "nodeAgg" optimization to more of the builtin transition · be2f825d
    Neil Conway authored
    functions. This patch optimizes int2_sum(), int4_sum(), float4_accum()
    and float8_accum() to avoid needing to copy the transition function's
    state for each input tuple of the aggregate. In an extreme case
    (e.g. SELECT sum(int2_col) FROM table where table has a single column),
    it improves performance by about 20%. For more complex queries or tables
    with wider rows, the relative performance improvement will not be as
    significant.
    be2f825d
    History
    Apply the "nodeAgg" optimization to more of the builtin transition
    Neil Conway authored
    functions. This patch optimizes int2_sum(), int4_sum(), float4_accum()
    and float8_accum() to avoid needing to copy the transition function's
    state for each input tuple of the aggregate. In an extreme case
    (e.g. SELECT sum(int2_col) FROM table where table has a single column),
    it improves performance by about 20%. For more complex queries or tables
    with wider rows, the relative performance improvement will not be as
    significant.