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
2 rows affected
9 rows affected
9 rows affected
parent_id | path | jsondata |
---|---|---|
null | {comments,1} | {"children": [], "username": "Mike Tyson", "comment_id": "a", "comment_body": "foo", "comment_likes": 1} |
{a} | {comments,1,children,1} | {"children": [], "username": "Mike Tyson", "comment_id": "b", "comment_body": "foofoo", "comment_likes": 232} |
{a} | {comments,1,children,2} | {"children": [], "username": "Mike Tyson", "comment_id": "d", "comment_body": "fooFOO", "comment_likes": 53} |
{a,b} | {comments,1,children,1,children,1} | {"children": [], "username": "Mike Tyson", "comment_id": "c", "comment_body": "foofoofoo", "comment_likes": 23232} |
jsonb_pretty |
---|
{ "comments": [ { "children": [ ], "username": "Mike Tyson", "comment_id": "a", "comment_body": "foo", "comment_likes": 1 } ] } |