By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
1 rows affected
1 rows affected
id | is_active | name |
---|---|---|
1 | t | main 1 |
2 | t | main 2 |
1 rows affected
1 rows affected
id | name |
---|---|
1 | Contact |
2 | Dropley |
1 rows affected
1 rows affected
1 rows affected
1 rows affected
id | name |
---|---|
1 | nested table second 1 |
2 | nested table second 2 |
3 | nested table second 3 |
4 | Drop |
1 rows affected
1 rows affected
1 rows affected
main_table_id | nested_table_1_id |
---|---|
1 | 1 |
main_table_id | nested_table_2_id |
---|---|
1 | 1 |
1 | 2 |
id | is_active | name | main_table_id | nested_table_1_id | id | name | main_table_id | nested_table_2_id | id | name |
---|---|---|---|---|---|---|---|---|---|---|
1 | t | main 1 | 1 | 1 | 1 | Contact | 1 | 2 | 2 | nested table second 2 |
1 | t | main 1 | 1 | 1 | 1 | Contact | 1 | 1 | 1 | nested table second 1 |
id | is_active | name | main_table_id | nested_table_1_id | id | name | main_table_id | nested_table_2_id | id | name |
---|---|---|---|---|---|---|---|---|---|---|
1 | t | main 1 | 1 | 1 | 1 | Contact | 1 | 2 | 2 | nested table second 2 |
1 | t | main 1 | 1 | 1 | 1 | Contact | 1 | 1 | 1 | nested table second 1 |
2 | t | main 2 | null | null | null | null | null | null | null | null |