Re: join to view over custom aggregate seems like it should be faster

Список
Период
Сортировка
От Tom Lane
Тема Re: join to view over custom aggregate seems like it should be faster
Дата
Msg-id 27416.1176224586@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: join to view over custom aggregate seems like it should be faster  ("Merlin Moncure")
Ответы Re: join to view over custom aggregate seems like it should be faster  ("Merlin Moncure")
Список pgsql-performance
Дерево обсуждения
join to view over custom aggregate seems like it should be faster  ("Merlin Moncure", )
 Re: join to view over custom aggregate seems like it should be faster  (Tom Lane, )
  Re: join to view over custom aggregate seems like it should be faster  ("Merlin Moncure", )
  Re: join to view over custom aggregate seems like it should be faster  ("Merlin Moncure", )
   Re: join to view over custom aggregate seems like it should be faster  ("Merlin Moncure", )
    Re: join to view over custom aggregate seems like it should be faster  (Tom Lane, )
     Re: join to view over custom aggregate seems like it should be faster  ("Merlin Moncure", )
      Re: join to view over custom aggregate seems like it should be faster  (Tom Lane, )
"Merlin Moncure" <> writes:
> For some reason, I can't get the index to be used on the table sitting
> under a view during a join, even though it should be, or at least it
> seems....

Nope, that's not going to work, because the aggregate keeps the subquery
from being flattened into the upper query, which is what would have to
happen for a nestloop-with-inner-indexscan join to be considered.
AFAICS you've got to structure it so that the aggregation happens above
the join.

            regards, tom lane

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

Предыдущее
От: Tobias Brox
Дата:
Сообщение: Long running transactions again ...
Следующее
От: "Michael Dengler"
Дата:
Сообщение: Re: Do I need to rebuild php-pgsql for 8.2.3