Re: Optimizing `WHERE x IN` query

Поиск
Список
Период
Сортировка
От Omar Roth
Тема Re: Optimizing `WHERE x IN` query
Дата
Msg-id DM5PR18MB105110A24BA55ACD72894026DFF30@DM5PR18MB1051.namprd18.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Optimizing `WHERE x IN` query  (Nicolas Charles <nicolas.charles@rudder.io>)
Ответы Re: Optimizing `WHERE x IN` query
Список pgsql-performance
> We had big performance issues with queries like that, and we modified
> them to use && (see
> https://www.postgresql.org/docs/current/functions-array.html ),
> resulting in a big perf boost

Much appreciated! Unfortunately I'm having trouble turning your suggestions
into a working query.

`cv.ucid && u.subscriptions`  doesn't appear to work in my case since the
comparison is `text && text[]`. Something like:

```
explain (analyze, buffers) select cv.* from channel_videos cv inner join
(select subscriptions from users where email = $1) as u on array[cv.ucid] &&
u.subscriptions;
```

does work but unfortunately doesn't appear to be faster than the current
query.

Cheers





В списке pgsql-performance по дате отправления:

Предыдущее
От: Ancoron Luciferis
Дата:
Сообщение: Re: Custom opclass for column statistics?
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: Optimizing `WHERE x IN` query