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'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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[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