Re: possible optimizations - pushing filter before aggregation

Поиск
Список
Период
Сортировка
От Douglas Doole
Тема Re: possible optimizations - pushing filter before aggregation
Дата
Msg-id CADE5jYJWtT_mD_ZO5ajZFFn1aZk_v+cv=p2s2bT-Zw=X8iRvAA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: possible optimizations - pushing filter before aggregation  (Mithun Cy <mithun.cy@enterprisedb.com>)
Ответы Re: possible optimizations - pushing filter before aggregation
Список pgsql-hackers
In above case wondering if we could do this

Min(a) = 2 is the condition, generate condition "a <= 2" and push it down as scan key. Since pushed down condition is lossy one for us ( it gives values < 2), finally do a recheck of "Min(a) = 2".

For Max(a) = 2 we can have "a >=2",

After replying, I was thinking along these lines too. I can't see any reason why it wouldn't work. The same would apply for HAVING clauses on min/max aggregations as well.

For min, you should be able to pre-filter =, < , and <=. In all cases the pre-filter would be <=. For max it would be =, > , >= becoming >=.

- Doug Doole
Salesforce

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

Предыдущее
От: Gilles Darold
Дата:
Сообщение: Re: Patch to implement pg_current_logfile() function
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [sqlsmith] Crash on GUC serialization