| От | Kevin Grittner |
|---|---|
| Тема | Re: Functional dependency in GROUP BY through JOINs |
| Дата | |
| Msg-id | 20121206180009.142840@gmx.com обсуждение исходный текст |
| Ответ на | Functional dependency in GROUP BY through JOINs ("David Rowley" <dgrowleyml@gmail.com>) |
| Список | pgsql-hackers |
Tom Lane wrote: > In the case being presented here, it's not apparent to me that > there's any advantage to be had at all. The OP reported a different plan which was twice as fast, although showing EXPLAIN ANALYZE results for both would be nice confirmation of that. > You still need to aggregate over the rows joining to each > uniquely-keyed row. Yes. > So how exactly are you going to "push down the GROUP BY", and > where does the savings come from? There are 1000000 million rows in bigsalestable that fall into 450 groups. The question is whether you look up related data in the products table once per row or once per group. Apparently those extra 999550 lookups take enough time to matter. -Kevin
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера