Re: Less-silly selectivity for JSONB matching operators
Alexey Bashtanov <bashtanov@imap.cc>
From: Alexey Bashtanov <bashtanov@imap.cc>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2020-03-31T16:08:26Z
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
Commits
-
Improve selectivity estimation for assorted match-style operators.
- a80818605e54 13.0 landed
-
Implement operator class parameters
- 911e70207703 13.0 cited