Re: Less-silly selectivity for JSONB matching operators

From: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Less-silly selectivity for JSONB matching operators
Date: 2020-03-31 16:08:26
Message-ID: a692a4d7-cc08-fe6a-dac0-625e292bf64d@imap.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Quickly tested like this:

create table t(a jsonb);
insert into t select jsonb_object( array[(random() * 10)::int::text],
'{" "}') from generate_series(1, 100000);
insert into t select jsonb_object( array[(random() * 10)::int::text],
array[(random() * 1000)::int::text]) from generate_series(1, 100000);
explain analyze select * from t where a ? '1';
analyze t;
explain analyze select * from t where a ? '1';

Best, Alex

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-03-31 16:20:32 Re: Less-silly selectivity for JSONB matching operators
Previous Message Alexey Bashtanov 2020-03-31 15:55:13 Re: Less-silly selectivity for JSONB matching operators