All Questions
Database Indexing medium

When is a Partial Index (`CREATE INDEX ... WHERE active=true`) a superior choice?

  1. A When you need to index a small subset of 'hot' data (e.g., Unprocessed Jobs) while ignoring millions of unrelated historical or archived records.
  2. B In a development environment where you want to minimize the physical disk footprint of the index by only including every tenth record from the table.
  3. C When implementing large-scale Sharding architectures that require different indexes for various geographic partitions of the same logical dataset.
  4. D When you must enforce a 'Unique' constraint across the entire table but only have enough storage space to index the most recently inserted records.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions