Bookmarks

OLAP — Analytical processing

Online Analytical Processing

An approach to data processing in which queries do not change the data but aggregate it: sums, averages and slices across dimensions over large volumes.

Also: analytical data processing, online analytical processing, data cube

checked 9 Nov

All terms

OLAP is a mode of working with data that underpins reports, dashboards and any analysis of history: instead of modifying records, queries compute aggregates and break them down by dimensions — time, region, product. Dedicated DBMSs are built for this mode of operation, and choosing one is easier once you understand how analytical workloads differ from transactional ones.

How an OLAP query differs from a transaction

AspectOLAPOLTP
What it does with the dataaggregates: sums, averages, groupingsmodifies: inserts, updates, deletes
Rows read per queryhundreds of thousands to billionsa few to a few dozen
How often queries runtens per minute, from analysts and dashboardsthousands per second, from applications
What matters moreresponse time of a heavy querylatency and reliability of each transaction

Because of these differences, the workloads are separated: transactions go to operational DBMSs, while for analytics the data is replicated or moved into a separate database — a warehouse or a data mart. The term was coined by Edgar Codd and co-authors in 1993 in the paper “Providing OLAP to User-Analysts: An IT Mandate”.

The cube and dimensions

The classical OLAP model is the cube: numeric indicators (measures) indexed by dimensions. A measure is, for example, revenue; the dimensions are date, region and product. An analyst navigates the cube with standard operations:

  • drill down — going down a dimension hierarchy: from year to quarter, month, day
  • roll up — the reverse aggregation: combining daily sums into monthly totals
  • slice — a cut along one value of a dimension: October 2026 only
  • dice — restricting several dimensions at once: Moscow only, electronics only

An example from the ClickHouse documentation: the query “top phone models of the month” over 100 million rows of web analytics runs in 92 milliseconds. Only a few of the table’s hundred-plus columns are actually read: in a columnar DBMS the values of a single column lie together on disk and compress well, whereas a row-oriented DBMS answering the same query pulls whole rows with all their columns from the disk.

Who runs OLAP

Implementations are traditionally divided into MOLAP — multidimensional engines that keep ready-made cubes; ROLAP — relational warehouses with a star schema; and HOLAP — a hybrid of the two. Modern columnar DBMSs and cloud warehouses run OLAP queries straight over tables, so the boundary between these categories is gradually blurring.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • OLTPonline transaction processing

    OLTP handles a stream of small transactions from applications; OLAP answers rare heavy queries from analysts who read millions of rows to compute aggregates.

  • DWHdata warehouse

    A data warehouse is the place where data is collected and organised; OLAP is the way that data is processed with analytical queries.

In depth in the references

where the topic is covered in detail