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?.
CREATE TABLE table_01 (
column_a VARCHAR,
column_b VARCHAR
);
INSERT INTO table_01
(column_a, column_b)
VALUES
('row_1 from table_01', 'row_1 from table_01'),
('row_2 from table_01', 'row_2 data from table_01');
CREATE TABLE table_02 (
column_c VARCHAR,
column_d VARCHAR
);
INSERT INTO table_02
(column_c, column_d)
VALUES
('row_1 from table_02', 'row_1 from table_02');
2 rows affected
1 rows affected
SELECT * FROM table_01
column_a | column_b |
---|---|
row_1 from table_01 | row_1 from table_01 |
row_2 from table_01 | row_2 data from table_01 |
SELECT * FROM table_02
column_c | column_d |
---|---|
row_1 from table_02 | row_1 from table_02 |