Databases · Senior · Question 22 of 75
When does table partitioning in PostgreSQL help most?
- 1For every table with more than 1000 rows
- ✓Correct answer: For very large tables queried by a partition key (often time), where old partitions can be dropped instantly and queries prune irrelevant partitions
- 3To make single-row lookups by primary key faster
Explanation
Dropping a monthly partition replaces a huge DELETE. Queries that don't filter on the partition key may get slower because they touch all partitions.