pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: martial.bizel@free.fr
To: pgsql-performance@postgresql.org
Subject: split partitioned table across several postgres servers
Date: Fri, 17 Feb 2006 09:12:39 +0100
Message-ID: <1140163959.43f585777f2cc@imp2-g19.free.fr> (raw)
In-Reply-To: <1140022257.22740.225.camel@state.g2switchworks.com>
References: <1140018930.43f34ef260de0@imp2-g19.free.fr>
	<1140022257.22740.225.camel@state.g2switchworks.com>

Hello,

I want to split table partitioned across two servers postgres (two hosts).
To query this remote object, I want to make view with union on two servers with
two dblink.

But, How to be sure that optimizer plan on remote node is same than local node
(ie : optimizer scan only the selected partitions and not make full scan  of
the remote object) ?

example : server 1 (table test partionned on field number and 1 < number <10)
          server 2 (table test partitioned on field number 10 <number <20)

server 3 has view like :
create view remote_test
as
select * from dblink('conn_server1', select * from test) as test_server1(....)
union
select * from dblink('conn_server2', select * from test) as test_server2(....)

If I've made select on view remote_test like :
select * from remote_test where number<5 and number >15.

optimizer made full scan of all partitions on all servers or
scan only partition 1 to partition 4 on server1
and scan partiton 16 to partition 19 on server2
and union  ?

In fact, I don't know how to have explain plan of remote node.

Thanks a lot.

MB





view thread (3+ messages)  latest in thread

Message-ID: <1140163959.43f585777f2cc@imp2-g19.free.fr>
Permalink:  ../1140163959.43f585777f2cc@imp2-g19.free.fr/
Also on:    postgresql.org/message-id/1140163959.43f585777f2cc@imp2-g19.free.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: martial.bizel@free.fr
  Subject: Re: split partitioned table across several postgres servers
  In-Reply-To: <1140163959.43f585777f2cc@imp2-g19.free.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox