Try
↑ ↓ move↵ openesc close
In this lesson · topic 7 of 7
  1. 1. Too much data, too many writes
  2. 2. Range, hash, and splitting
  3. 3. Split a hot range and compare layouts
  4. 4. When one key outruns every partition
  5. 5. Adding a node, and how requests find their partition
  6. 6. Looking up by the column you did not partition on
  7. 7. Check the partitioning rules

Topic 7

Check the partitioning rules

4 min read

Predict first

A feed table is keyed by creation time and range partitioned. Writes are always new rows. You split the busy partition. What does the load on the new partition look like?

Predict first

Which query gets more expensive when you move from range to hash partitioning?

Predict first

One product is far more popular than any other. Which change, by itself, relieves the partition holding it?

Take away

  • Partitioning cuts data by key so both storage and writes can spread.
  • Range keeps neighbours together, which helps scans and hurts under sequential keys. Hash scatters them, which flattens sequential keys and makes scans touch every partition.
  • Neither rule fixes a single hot key. Splitting a hot range helps until the partition is one key.

Sources

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms