agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tim Dudgeon <tdudgeon.ml@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Querying with arrays
Date: Thu, 27 Nov 2014 16:55:35 +0000
Message-ID: <54775787.4030801@gmail.com> (raw)
In-Reply-To: <3676.1417100070@sss.pgh.pa.us>
References: <547722A7.4040702@gmail.com>
	<3676.1417100070@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

On 27/11/2014 14:54, Tom Lane wrote:
> You could create a GIN index on lists.hits and then do
>
> SELECT t1.*
> FROM some_table t1
> JOIN lists l ON array[t1.id] <@ l.hits
> WHERE l.id = 2;
>
> How efficient that will be remains to be determined though;
> if the l.id condition will eliminate a lot of matches it
> could still be kind of slow.
Afraid that was *much* slower.

Tim


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (6+ messages)  latest in thread

Message-ID: <54775787.4030801@gmail.com>
Permalink:  ../54775787.4030801@gmail.com/
Also on:    postgresql.org/message-id/54775787.4030801@gmail.com

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-sql@postgresql.org
  Cc: tdudgeon.ml@gmail.com
  Subject: Re: Querying with arrays
  In-Reply-To: <54775787.4030801@gmail.com>

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

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