Insertion rate is very slow after continuous aggregates generation

I created a continuous aggregate and inserted 1 million rows per second. (10,000 rows X 100 instances)
I confirmed that the insertion rate was very late than before continuous aggregates were created.
When I create a continuous aggregate, a trigger named ts_cagg_invalidation_trigger is generated and is thought to slow down.
Is it okay to modify the code of the trigger so that each time Insert is performed, only one row trigger?

Hi @sai3670 , the trigger cannot be removed without breaking the behavior.

I’m not sure if if you use the option WITH NO DATA while creating the continuous aggregates.

Later you can just call refresh_continuous_aggregates with the time period that you want.

Or you can add_continuous_aggregates_policy to run it with a pre-configured time interval.

If you can creating an issue in the github repository, sharing a minimal POC with the example detailed of what you’re trying, because the actual function is very optimized and use caches and commit callbacks. So, it could be potentially a contention point, but we need more details to investigate.