Re: GIN index on JSONB not used due to lack of nested statistics

2019-10-30 Thread Jeff Janes
On Wed, Oct 30, 2019 at 12:25 PM Alessandro Baretta wrote: > -> Bitmap Index Scan on idx_object > (cost=0.00..75580.00 rows=1 width=0) (actual time=24.094..24.094 > rows=77 loops=1) >Index Cond: ((... @> ...::jsonb) AND (... > @> ...::jsonb)) >

GIN index on JSONB not used due to lack of nested statistics

2019-10-30 Thread Alessandro Baretta
I have created a GIN index using jsonb_path_ops over some JSONB columns. Initially, while the index was small, the query planner would select a Bitmap Index Scan strategy to execute queries leveraging the appropriate JSONB operator (@>). Now that the table has grown to almost 200k rows and the