All Questions
Postgresql hard

If two columns (e.g., `City` and `State`) are highly correlated, the standard query planner may underestimate row counts. How can an administrator resolve this?

  1. A Create a Multi-Column Index to force the database to scan the related keys within a single B-Tree.
  2. B Create a `STATISTICS` object to track functional dependencies and N-distinct values between columns.
  3. C Increase the `max_parallel_workers_per_gather` setting to allow more CPUs to scan the table data.
  4. D Manually update the `pg_class` system catalog to force a specific selectivity ratio for the join key.

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

Get the app

Related questions