Re: BUG #5652: Optimizer does wrong thing with partitioned tables
В списке pgsql-bugs по дате отправления:
| От | Jeff Davis |
|---|---|
| Тема | Re: BUG #5652: Optimizer does wrong thing with partitioned tables |
| Дата | |
| Msg-id | 1284145750.21846.7.camel@jdavis-ux.asterdata.local обсуждение исходный текст |
| Ответ на | Re: BUG #5652: Optimizer does wrong thing with partitioned tables (Chris Travers <chris@metatrontech.com>) |
| Ответы |
Re: BUG #5652: Optimizer does wrong thing with partitioned
tables
|
| Список | pgsql-bugs |
On Fri, 2010-09-10 at 08:10 -0700, Chris Travers wrote:
> Just adding my voice to the "fix it" camp. Is there any reason the
> table scans in this sort of thing cannot be independently planned?
I don't think it's about independent planning. For instance, AVG clearly
can't be planned this way, there are particular properties of MAX that
allow the optimization:
1. MAX(x) can be rewritten as: ORDER BY x DESC LIMIT 1
2. The MAX of set S is the MAX of the MAXes of each partition of S
The optimizer knows about the former, but not the latter.
Regards,
Jeff Davis
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера