Re: Using GROUPING SETS with more than one set disables predicate pushdown?

2017-11-21 Thread Andres Freund
On November 21, 2017 6:49:26 AM PST, Tom Lane wrote: >Zakhar Shapurau writes: > >Presumably, we could examine the grouping sets to identify column(s) >present in all sets, and then allow the optimization for clauses that >reference only such columns. Or maybe I'm misreading the comment >(but t

Re: Using GROUPING SETS with more than one set disables predicate pushdown?

2017-11-21 Thread Tom Lane
Zakhar Shapurau writes: > Using GROUPING SETS with more than one set disables predicate pushdown? It looks like this is a case that no one's gotten round to yet. The comment in the relevant code is * In some cases we may want to transfer a HAVING clause into WHERE. We * cann

Using GROUPING SETS with more than one set disables predicate pushdown?

2017-11-21 Thread Zakhar Shapurau
Hi! First of all, thanks for the great work! PostgreSQL is amazing, and community is super helpful. I found an unexpected behaviour in PostgreSQL, and was advised to post it to the performance mailing list on IRC. Using GROUPING SETS with more than one set disables predicate pushdown? Version