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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Support for distributed queries with semijoins could be possible, if ...
Дата
Msg-id 6693.1023649258@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Support for distributed queries with semijoins could be possible, if ...  (Gunther Schadow <gunther@aurora.regenstrief.org>)
Список pgsql-sql
Gunther Schadow <gunther@aurora.regenstrief.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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Q: will GROUP BY make use of an index to return tuples early?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: select failure