pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eric Brison <eric.brison@anakeen.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Extension intarray and null values
Date: Thu, 25 Feb 2021 10:06:54 -0500
Message-ID: <108775.1614265614@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+GXEX_BoViVZ4Jho0vf47DoNT9rPBpoy+93X1GYJYK3eYD+rg@mail.gmail.com>
References: <CA+GXEX_BoViVZ4Jho0vf47DoNT9rPBpoy+93X1GYJYK3eYD+rg@mail.gmail.com>

Eric Brison <eric.brison@anakeen.com> writes:
> I use tables with several "int[]" columns.
> I use the "@>" operator to filter my data.
> To increase speed , i install the "intarray" extension. Now queries are
> very fast with the specific indexes (i use "gin__int_ops").
> But, in few columns, i have null values in my intarray and i cannot use the
> "@>" operator.

Do you really need to use intarray, rather than the built-in gin array
indexing features?

Yeah, the intarray implementation is probably a shade faster, but it's
faster precisely because it doesn't handle cases like null entries.
If you're in need of that, my suggestion is to ditch intarray.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <108775.1614265614@sss.pgh.pa.us>
Permalink:  ../108775.1614265614@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/108775.1614265614@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, eric.brison@anakeen.com
  Subject: Re: Extension intarray and null values
  In-Reply-To: <108775.1614265614@sss.pgh.pa.us>
  References: <CA+GXEX_BoViVZ4Jho0vf47DoNT9rPBpoy+93X1GYJYK3eYD+rg@mail.gmail.com> <108775.1614265614@sss.pgh.pa.us>

* 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