AI Briefing
KO

[if kakao 2022] Optimal Aggregation Considering Batch Performance

·2022.12.09 20:00

Key point

To reduce the DB load that occurs when aggregating large volumes of data, a new Aggregation architecture is proposed instead of complex GroupBy queries.

Details

When generating statistical data, developers mainly use GroupBy, Sum, and Count syntax to delegate aggregation operations to the DB. However, once the data grows to tens of millions of records or more, this approach causes serious performance problems.

Complex queries that combine Join and GroupBy make the execution plan hard to predict. Even with indexes set up, they can create Temporary Tables or trigger Filesort, sharply degrading lookup performance.

This query-dependent approach causes the following problems:

  • Since the computation process is concentrated in the query, it adds to the database load
  • Query tuning difficulty increases as data volume changes
  • Adding indexes leads to degraded write performance and storage space issues

Ultimately, simply improving the existing ItemReader has its limits, and a new Aggregation architecture is needed that simplifies complex queries and fundamentally changes the way computation is performed.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.