Using a column to mark rolled up rows might have been a better choice, but
there are unfortunately some regulatory requirements
that require that table to be immutable. I'm not sure about the
implications w.r.t. auto vacuum, which is already a consideration for us
due to the sheer size of the table
On Mon, Feb 10, 2020 at 4:39 PM Tom Lane wrote:
>
> Well, it's not that hard to get rid of that scalar sub-select: since
> you're already relying on current_rollup to produce exactly one row,
> you could write a plain join instead, something like
>
Using a join instead of the sub-select did alrea