Re: Support for distributed queries with semijoins could be possible, if ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gunther Schadow <gunther(at)aurora(dot)regenstrief(dot)org>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Support for distributed queries with semijoins could be possible, if ...
Date: 2002-06-09 19:00:58
Message-ID: 6693.1023649258@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Gunther Schadow <gunther(at)aurora(dot)regenstrief(dot)org> writes:
> SELECT fever.patient_id AS patient_id,
> fever.value AS fever,
> wbc.value AS wbc
> FROM (SELECT patient_id, value
> FROM STDIN) fever
> INNER JOIN Observation wbc
> ON fever.patient_id = wbc.patient_id
> WHERE wbc.type_code = 'WHITE BLOOD CELL COUNT'
> AND wbc.value < 1000;

A much more direct way of doing it is to leave the client out of the
loop. The data from system A could be pulled directly into system B,
using e.g. Joe Conway's contrib/dblink package. dblink is pretty
awkward to use in 7.2 but in 7.3 it should be a lot nicer --- the
returned data can be treated as a table function...

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-06-09 19:28:07 Re: select failure
Previous Message Ian Cass 2002-06-09 18:58:19 Re: select failure