Re: Querying with arrays

Поиск
Список
Период
Сортировка
От Tim Dudgeon
Тема Re: Querying with arrays
Дата
Msg-id 54775787.4030801@gmail.com
обсуждение исходный текст
Ответ на Re: Querying with arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Querying with arrays
Следующее
От: Ron256
Дата:
Сообщение: Re: generating the average 6 months spend excluding first orders