-
Book Overview & Buying
-
Table Of Contents
AI-Ready PostgreSQL 18
By :
In this chapter, we went through the third and final step of the Extract, Load, and Transform (ELT) process. PostgreSQL provides multiple ways to transform data from a normalized, transaction-optimized model into a denormalized, analytics-optimized model: views, materialized views, tables, and triggers. While views are easy to implement, they don't scale to larger data volumes or user counts. Based on a performance analysis, we recommend two options: materialized views or tables and triggers. They are the way to go when creating a real-world analytics-focused data model. The choice is driven by implementation complexity and the need for near-real-time insights.
The next chapter introduces PostgreSQL's native analytics query capabilities that build on the analytics data model: GROUPS, GROUPING SETS, ROLLUPS, CUBES, WINDOW FUNCTIONS, and COMMON TABLE EXPRESSIONS (CTE). Those are the SQL constructs that we use to create reports and analyze data.