What is OLAP?
OLAP, told as a story about a manager slicing the whole warehouse's inventory by region, time, and item — instead of handling one box at a time.
Finding this quarter's regional inventory changes means adding every receipt by hand.A pile of receipts alone doesn't show the regional stock trend.
A receipt-handling system is fast on one record but slow at the full aggregate.Handling one record (OLTP) and analyzing all records are different jobs.
OLAP pre-stacks data by region, time, and item, and slices it any way you like.Slice the cube any way, and the analysis answer is right there.
The worker uses OLTP; the manager uses OLAP.OLTP handles 'this box right now'; OLAP handles the overall trend.
OLAP isn't built for checking the one record that just came in.The cube is usually rebuilt in periodic batches, and multi-dimensional indexes cut its lookup time.
OLAP (Online Analytical Processing) analyzes the whole dataset by pre-aggregating it across several axes — region, time, item — and slicing it any way you like.
Unlike OLTP, which processes one transaction quickly, OLAP uses a cube (multi-dimensional aggregate) structure to support fast slice/dice, drill-down, roll-up, and pivot operations. It's typically built by modeling data warehouse data into a star schema, and reflecting the very latest transactions lags by however often the cube batch-refreshes. MOLAP usually precomputes the cube, while ROLAP usually computes aggregates from relational tables at query time.
When grown-ups say it
- OLTP
- Processing one receipt quickly. The counterpart concept to OLAP.
- Cube
- A block pre-stacked across several axes. The core structure behind OLAP analysis.
- Slice & Dice
- Cutting one slice, or several, out of the cube. The basic way of viewing a cube.
- Drill-down
- Digging from a big unit into a smaller one. Quarter → month → day, for example.
- Pivot / Roll-up
- Rotating the view axis (pivot), or adding values up to a bigger unit (roll-up). Views the same data from a different angle.
- Star Schema
- The table design used to build a cube. Splits into fact tables and dimension tables.
- Multi-dimensional Index
- The index that speeds up cube lookups. A related page in the same field. → finding by several tags at once
- Batch Refresh Lag
- The delay caused by how often the cube is rebuilt. The latest transactions reach the cube at the next rebuild.