liveBook · Manning

Vertical partitioning

As explained in Latency

Vertical partitioning divides a table into partitions containing different subsets of columns, typically retaining a linking key.

Vertical partitioning divides each record by columns, placing different subsets of fields into separate physical partitions while retaining enough information to relate the pieces. A table with columns A, B, and C might become one partition for A and another for B and C. Queries can then read only the required column groups instead of complete records. section 5.2.2

The technique targets read-intensive OLAP workloads, where systems scan large datasets for aggregates, time-series analysis, joins, subqueries, rankings, and sorting. Separating columns can improve compression and reduce read amplification because values from the same column usually share data characteristics more closely than mixed fields such as identifiers, email addresses, and usernames. section 5.2.2

Bookstore analytics

A bookstore can analyze recent orders to identify best-selling products or train a recommendation model from customers’ purchase histories. Vertical partitions let an analytical query read only the order fields needed for its calculation, rather than every field in each record. section 5.2.2

Use vertical partitioning when the workload benefits from column-focused access:

  • Group frequently co-read columns together, such as B and C, while isolating columns accessed independently, such as A. section 5.2.2
  • Prefer it for structured relational rows and column-oriented analytical processing; unstructured documents and key–value pairs may not have practical smaller parts. section 5.2.2
  • Treat it as one physical layout choice among horizontal, vertical, and hybrid partitioning, and distinguish it from workload partitioning by user, geography, or function. section 5.7 section 5.3
Figure 5.2 Vertical partitioning of a database table. At the top of the figure is the full logical table with four rows. At the bottom of the figure, you can see two vertical partitions of the same table, each with four rows, but only two columns.
Figure 5.2: Example of vertical partitioning of a database table. At the top of the diagram, you see the full logical table with four rows. At the bottom of the diagram, you see two vertical partitions of the same table, each with four rows, but only two columns.

Shows a four-row logical table transformed into two vertical partitions, each retaining the same rows but only a subset of columns. section 5.2.2

How Latency covers it

How deep it goes
Defines column slicing, explains compression and read-amplification effects, and stops short of implementation details.
Examples
Uses A/B/C column splits, a four-row partition diagram, bookstore sales analysis, and recommendation-model training.
What it assumes
Assumes familiarity with records, rows, columns, relational tables, and read-intensive analytical workloads.
What you can do after
Evaluate column layouts for analytical workloads and identify when separating fields can reduce reads and improve compression.
How it connects
Connects vertical partitioning with horizontal partitioning, hybrid partitioning, OLAP, compression, read amplification, and workload partitioning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Latency. The section links point to the parts of the book it draws on.