pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Bart Degryse <Bart.Degryse@indicator.be>
To: pgsql-jdbc@postgresql.org
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Query with tables from 2 different databases inJava
Date: Thu, 7 Jun 2007 08:51:08 -0700 (PDT)
Message-ID: <394431.68251.qm@web31810.mail.mud.yahoo.com> (raw)
In-Reply-To: <4668390D.A3DD.0030.0@indicator.be>


--- Bart Degryse <Bart.Degryse@indicator.be> wrote:

> Personally I have no good experiences with neither dblink nor dbi-link.
> They perferm only acceptably on very few records.
> My approach now is to use srf plperl functions. That approach requires you
> to have a reasonable knowledge of perl, but is in my experience the fastest
> (or at least slow) one and certainly the most flexible one.

I am sure that the same result can be implemented in pljava as you were able to achieve in plperl
just incase the OP doesn't have a strength in one of the other other pl-languages.

I am not exactly sure how DBLINK works, but I guess that the calling database has to pull all of
(or at least most of) the records from the table of the linked database in order to develop a
JOIN, which would effectivly and always be a SEQ Scan that is pushed through a less that optimal
com connection.  If the table was very large, this would probably be a preformance killer.

But if the table is simply a smaller look-up table with less-than a few thousand records that can
easily be materialized in the calling database, DBLINK could be a workable solution.

Regards,
Richard Broersma Jr.



view thread (12+ messages)  latest in thread

Message-ID: <394431.68251.qm@web31810.mail.mud.yahoo.com>
Permalink:  ../394431.68251.qm@web31810.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/394431.68251.qm@web31810.mail.mud.yahoo.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: rabroersma@yahoo.com, Bart.Degryse@indicator.be, pgsql-novice@postgresql.org
  Subject: Re: [NOVICE] Query with tables from 2 different databases inJava
  In-Reply-To: <394431.68251.qm@web31810.mail.mud.yahoo.com>
  References: <4668390D.A3DD.0030.0@indicator.be> <394431.68251.qm@web31810.mail.mud.yahoo.com>

* 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