Tom Lane wrote:
Josh Berkus writes:
The issue here is that the planner is capable of "pushing down" the WHERE
criteria into the first view, but not into the second, "nested" view, and so
postgres materializes the UNIONed data set before perfoming the join.
Thing is, I seem to recall that this p
Josh Berkus wrote:
Gaetano,
I did in that way just to not use postgresql specific feature.
I can give it a try and I let you know, however the question remain,
why the index usage is lost if used in that way ?
Because PostgreSQL is materializing the entire UNION data set in the
subselect. What
Josh Berkus writes:
> The issue here is that the planner is capable of "pushing down" the WHERE
> criteria into the first view, but not into the second, "nested" view, and so
> postgres materializes the UNIONed data set before perfoming the join.
> Thing is, I seem to recall that this particula
Klint,
> This is how I interpret it (if anyone wants to set me straight or
> improve on it feel free)
>
> Views are implemented as rules.
>
> Rules are pretty much just a macro to the query builder. When it sees
> the view, it replaces it with the implementation of the view.
Right so far.
>
> W
On Thu, 03 Feb 2005 02:10:15 +0100, Gaetano Mendola <[EMAIL PROTECTED]> wrote:
> why the index usage is lost if used in that way ?
This is how I interpret it (if anyone wants to set me straight or
improve on it feel free)
Views are implemented as rules.
Rules are pretty much just a macro to th
Gaetano,
> I did in that way just to not use postgresql specific feature.
> I can give it a try and I let you know, however the question remain,
> why the index usage is lost if used in that way ?
Because PostgreSQL is materializing the entire UNION data set in the
subselect. What Postgres ver
Josh Berkus wrote:
Gaetano,
I have a big table with ~ 10 Milion rows, and is a very
pain administer it, so after years I convinced my self
to partition it and replace the table usage ( only for reading )
with a view.
Now my user_logs table is splitted in 4:
user_logs
user_logs_2002
user_logs_2003
Gaetano,
> I have a big table with ~ 10 Milion rows, and is a very
> pain administer it, so after years I convinced my self
> to partition it and replace the table usage ( only for reading )
> with a view.
>
> Now my user_logs table is splitted in 4:
>
> user_logs
> user_logs_2002
> user_logs_2003
Hi all,
I have a big table with ~ 10 Milion rows, and is a very
pain administer it, so after years I convinced my self
to partition it and replace the table usage ( only for reading )
with a view.
Now my user_logs table is splitted in 4:
user_logs
user_logs_2002
user_logs_2003
user_logs_2004
and th