Re: Aggregate and many LEFT JOIN

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Aggregate and many LEFT JOIN
Дата
Msg-id 20190226135134.GS28750@telsasoft.com
обсуждение исходный текст
Ответ на Re: Aggregate and many LEFT JOIN  (kimaidou <kimaidou@gmail.com>)
Список pgsql-performance
On Tue, Feb 26, 2019 at 01:54:00PM +0100, kimaidou wrote:
> I manage to avoid the disk sort after performing a VACUUM ANALYSE;
> And with a session work_mem = '250MB'
> 
> * SQL http://paste.debian.net/1070207/
> * EXPLAIN https://explain.depesz.com/s/nJ2y
> 
> It stills spent 16s
> It seems this kind of query will need better hardware to scale...

Once you've exhausted other ideas, you could consider making that a TEMPORARY
TABLE, and creating an index on it (and analyzing it) and then aggregating.
It'd be several separate queries.

Justin


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

Предыдущее
От: kimaidou
Дата:
Сообщение: Re: Aggregate and many LEFT JOIN
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Aggregate and many LEFT JOIN