On 2/29/08, Scara Maccai <m_lists@yahoo.it> wrote:
> I'm sorry, I didn't understand you post...
>
> 1) Why does my current implementation is not working? Hierarchy doesn't work with views in general, not only with
dblink
Exactly, because inheritance/constraint exclusion wont work with views.
> 2) Why am I supposed to use unions in the view?
So that query evaluator can exclude unnecessary partitions.
Given view:
create view.. as
select * from blah() where id >= 0 and id < 10000
union all
select * from blah() where id >= 10000 and id < 20000
...
Then running query
select * from view where id = 10;
can skip partitions by simply examining where expression.
Quite likely you need to tune it for your case.
> 3) I know that I am doing select * from tbl in the remote db; that is something I can work on later.
> At least I would like to see it working, since there is nothing in the docs that says it shouldn't be working...
> 4) I am not able to rewrite my queries.
Have fun then.
--
marko