From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Shaheed Haque <shaheedhaque(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Unable to make use of "deep" JSONB index |
Date: | 2022-06-12 21:24:48 |
Message-ID: | CAMkU=1zHod+UktMioLywae=NsEtAmFe1S1VRqSqSqin4NGXH6Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Sun, Jun 12, 2022 at 5:34 AM Shaheed Haque <shaheedhaque(at)gmail(dot)com>
wrote:
> OK, I have corrected and simplified the test case (including switching
> to a btree index). The WHERE clause and the inex now look like this:
>
> ...WHERE ((snapshot -> 'employee' -> '999' ->>
> 'pay_graph')::integer != 0);
> ...USING btree (((snapshot -> 'employee' -> '$.*' ->>
> 'pay_graph')::integer != 0));
>
But, this is not a correction. You are still trying to use -> as if it
were @?, and that is still not going to work.
You are indexing the part of snapshot which has the employee number of
'$.*', which is a weird employee number for anyone to have. You might want
to represent a wildcard but that is not what -> does.
Cheer,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-06-12 21:55:47 | Re: Unable to make use of "deep" JSONB index |
Previous Message | Shaheed Haque | 2022-06-12 19:31:19 | Re: Unable to make use of "deep" JSONB index |