Search Postgresql Archives

Re: partitioning using dblink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/29/08, Scara Maccai <m_lists@xxxxxxxx> wrote:
> I can't get views to participate in the hierarchy...

The partition exclusion _may_ work if you do something like:

create view as
  select * from dblink/plproxy-from-part1 where part1 constraint
  union all
  select * from dblink/plproxy-from-part2 where part2 constraint

So if you do 'select * from view where constraint;' the postgres
will skip partitions which do not match.  You may need to
define the setof function immutable or something... i'm not sure.

But any contraint exclusion wont change the fact you are
doing select * from tbl; in remote db, which makes the
exercise quite pointess IMHO.

I obviously would recommend pl/proxy for such task, but that
would expect you are able to write your queries.  If you are
in situation where you don't control the queries, then plproxy
quite likely is not use.

-- 
marko

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux