Dive into PostgreSQL Partitioning and Sharding to understand declarative partitioning, inheritance-based partitioning, sharding setup with FDWs, and techniques for partition maintenance and optimizing performance in large-scale databases.
| Qno | Answer |
|---|---|
| 1 | B) A method of splitting tables into sub-tables based on specific rules |
| 2 | A) It allows you to define partitions based on columns with specific ranges. |
| 3 | A) Use the CREATE TABLE command with the PARTITION BY clause |
| 4 | C) Partition by range |
| 5 | B) Only relevant partitions are queried, improving performance. |
| 6 | C) Foreign keys cannot reference partitioned tables. |
| 7 | A) When data can be split into separate ranges or lists |
| 8 | C) The method for dividing data into ranges based on a column |
| 9 | A) A method of table partitioning that uses child tables |
| 10 | B) It is a template for the child tables |
| 11 | B) CREATE TABLE INHERITS |
| 12 | C) PostgreSQL 9.4 |
| 13 | B) Use the CHECK constraint on the parent table |
| 14 | B) It is based on inheritance instead of partitioning rules |
| 15 | D) It can be slower due to lack of partition pruning |
| 16 | B) Queries can automatically include child tables. |
| 17 | A) Splitting large tables into smaller tables across different databases |
| 18 | A) Foreign Data Wrappers (FDWs) |
| 19 | B) By connecting different PostgreSQL instances for distributing data |
| 20 | A) postgres_fdw |
| 21 | A) Connect to other PostgreSQL databases for distributed queries |
| 22 | A) FDWs allow data to be split across multiple servers and databases |
| 23 | B) Synchronization of data across servers |
| 24 | B) By distributing data across multiple servers |
| 25 | D) All of the above |
| 26 | B) Eliminating unnecessary partitions during queries |
| 27 | A) By creating indexes on partitioned columns |
| 28 | A) Creating new partitions over time and dropping old ones |
| 29 | A) Range partitioning |
| 30 | A) Query performance degrades significantly |