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 4
id | data |
---|---|
1 | [{"id": "1", "status": "test status1", "updatedAt": "15711500000"}, {"id": "2", "status": "test status2", "updatedAt": "15711500000"}, {"id": "3", "status": "test status3"}] |
2 | [{"id": "4", "status": "test status4"}] |
3 | [{"id": "5", "status": "test status5", "updatedAt": "15711500000"}] |
4 | [{"id": "6", "status": "test status5", "updatedAt": "15711500000"}] |
UPDATE 4
jsonb_pretty |
---|
[ { "id": "1", "status": "test status1", "updatedAt": "15711500000" }, { "id": "2", "status": "test status2", "updatedAt": "15711500000" }, { "id": "3", "status": "test status3" } ] |
[ { "id": "4", "status": "test status4" } ] |
[ { "id": "5", "status": "test status5", "updatedAt": "15711500000" } ] |
[ { "id": "6", "status": "test status5", "updatedAt": "15711500000" } ] |
SELECT 4