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
INSERT 0 1
id | sum | keyvalue |
---|---|---|
1 | 2 | "key1"=>"1", "key2"=>"1" |
SELECT 1
id | sum | keyvalue | key | value |
---|---|---|---|---|
1 | 2 | "key1"=>"1", "key2"=>"1" | key1 | 1 |
1 | 2 | "key1"=>"1", "key2"=>"1" | key2 | 1 |
SELECT 2
key | sum |
---|---|
key3 | 1 |
key1 | 2 |
key2 | 2 |
SELECT 3
hstore |
---|
"key1"=>"2", "key2"=>"2", "key3"=>"1" |
SELECT 1
CREATE FUNCTION
UPDATE 1
id | sum | keyvalue |
---|---|---|
1 | 2 | "key1"=>"2", "key2"=>"2", "key3"=>"1" |
SELECT 1