pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexey Bashtanov <bashtanov@imap.cc>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: Re: Less-silly selectivity for JSONB matching operators
Date: Tue, 31 Mar 2020 17:08:26 +0100
Message-ID: <a692a4d7-cc08-fe6a-dac0-625e292bf64d@imap.cc> (raw)
In-Reply-To: <14469.1582927774@sss.pgh.pa.us>
References: <12237.1582833074@sss.pgh.pa.us>
	<14469.1582927774@sss.pgh.pa.us>

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





view thread (12+ messages)  latest in thread

Message-ID: <a692a4d7-cc08-fe6a-dac0-625e292bf64d@imap.cc>
Permalink:  ../a692a4d7-cc08-fe6a-dac0-625e292bf64d@imap.cc/
Also on:    postgresql.org/message-id/a692a4d7-cc08-fe6a-dac0-625e292bf64d@imap.cc

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: bashtanov@imap.cc, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: Less-silly selectivity for JSONB matching operators
  In-Reply-To: <a692a4d7-cc08-fe6a-dac0-625e292bf64d@imap.cc>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox