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?.
version |
---|
PostgreSQL 14.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit |
SELECT 1
CREATE TABLE
INSERT 0 3
CREATE INDEX
t_id | data | bitmask | published | visible | rubbish | masterpiece | meh | arts | legal | sport | politics |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | Document 1 | 000100000 | f | f | f | t | f | f | f | f | f |
2 | Document 2 | 100000000 | t | f | f | f | f | f | f | f | f |
3 | Document 3 | 101000001 | t | f | t | f | f | f | f | f | t |
SELECT 3
t_id | published | legal |
---|---|---|
1 | f | f |
2 | t | f |
3 | t | f |
SELECT 3
BEGIN
UPDATE 1
UPDATE 1
COMMIT
t_id | published | legal |
---|---|---|
1 | f | f |
2 | t | f |
3 | t | t |
SELECT 3
octet_length |
---|
44 |
44 |
44 |
SELECT 3
id_sod | data_sod | bm_sod | row_size_on_disk |
---|---|---|---|
4 | 11 | 7 | 55 |
4 | 11 | 7 | 55 |
4 | 11 | 7 | 55 |
SELECT 3
tbl | ct | txt_len |
---|---|---|
854699 | 3 | 132 |
SELECT 1
tbl | ct | txt_len | metric | bytes | bytes_pretty | bytes_per_row |
---|---|---|---|---|---|---|
854699 | 3 | 132 | core_relation_size | 8192 | 8192 bytes | 2730 |
854699 | 3 | 132 | visibility_map | 0 | 0 bytes | 0 |
854699 | 3 | 132 | free_space_map | 0 | 0 bytes | 0 |
854699 | 3 | 132 | table_size_incl_toast | 16384 | 16 kB | 5461 |
854699 | 3 | 132 | indexes_size | 16384 | 16 kB | 5461 |
854699 | 3 | 132 | total_size_incl_toast_and_indexes | 32768 | 32 kB | 10922 |
854699 | 3 | 132 | live_rows_in_text_representation | 132 | 132 bytes | 44 |
854699 | 3 | 132 | ------------------------------ | null | null | null |
854699 | 3 | 132 | row_count | 3 | null | null |
854699 | 3 | 132 | live_tuples | 0 | null | null |
854699 | 3 | 132 | dead_tuples | 0 | null | null |
SELECT 11