Re: Push predicate down in view containing window function - Mailing list pgsql-general

From Tom Lane
Subject Re: Push predicate down in view containing window function
Date
Msg-id 32583.1384469029@sss.pgh.pa.us
Whole thread Raw
In response to Push predicate down in view containing window function  (Philippe Girolami <philippe.girolami@sensorly.com>)
Responses Re: Push predicate down in view containing window function
List pgsql-general
Philippe Girolami <philippe.girolami@sensorly.com> writes:
> Hello,
> Using postgres 9.1.9, I have a view that uses a window function. I then query that view with a predicate on one of
thecolumns. Unfortunately, the predicate doesn't get pushed down into the view. 
> Given that the predicate applies to a column that's being partitionned on, why wouldn't the optimizer push the
predicatedown ? 

Because there is zero optimization around window functions right now.
It certainly isn't smart enough to decide that it'd be safe to push
down a constraint that only mentions partitioning columns.

            regards, tom lane


pgsql-general by date:

Previous
From: Dang Minh Huong
Date:
Subject: Re: Equivalent syntax of PL/SQL using array in PL/pgSQL
Next
From: Michael Paquier
Date:
Subject: Re: Tuning 9.3 for 32 GB RAM