Re: Very slow 101-feeling design/query..

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Very slow 101-feeling design/query..
Дата
Msg-id 13148.1639191413@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Very slow 101-feeling design/query..  (Wells Oliver <wells.oliver@gmail.com>)
Список pgsql-admin
Wells Oliver <wells.oliver@gmail.com> writes:
> PG 13.4. Can't quite run the EXPLAIN ANALYZE since it takes so long, but
> EXPLAIN SELECT DISTINCT game_id FROM vw_joints shows (s = joints, p = plays)

I doubt you're going to get a query plan that's significantly better
than what you show here.  But those tables are pretty large, so
I wonder whether you have cranked up work_mem.

One potential issue is that the planner thinks there are only
about 1829 distinct game_id values:

>  HashAggregate  (cost=63810150.11..63810168.40 rows=1829 width=4)
>    Group Key: p.game_id

Is that about the right size of result for this?

            regards, tom lane



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

Предыдущее
От: Ron
Дата:
Сообщение: Re: Very slow 101-feeling design/query..
Следующее
От: Rui DeSousa
Дата:
Сообщение: Re: Very slow 101-feeling design/query..