Re: Querying with arrays - Mailing list pgsql-sql

From Tim Dudgeon
Subject Re: Querying with arrays
Date
Msg-id 54775787.4030801@gmail.com
Whole thread Raw
In response to Re: Querying with arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-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



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Querying with arrays
Next
From: Ron256
Date:
Subject: Re: generating the average 6 months spend excluding first orders