Quick Answer
Table partitioning for large datasets: use declarative partitioning (PostgreSQL 10+). Partition by range (date/timestamp for time-series), list (region, status), or hash (for even distribution). Partition pruning automatically skips irrelevant partitions. Attach older partitions to cheaper tablespaces. Detach and archive old partitions without locking. Each partition is its own physical table with independent indexes.
Answer
Partition keys should have high cardinality. Range and hash partitioning distribute data and enable pruning for faster queries.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.