Re: Accessing 2 different databases in the same query ?

Поиск
Список
Период
Сортировка
От Darko Prenosil
Тема Re: Accessing 2 different databases in the same query ?
Дата
Msg-id 200306021420.36955.darko.prenosil@finteh.hr
обсуждение исходный текст
Ответ на Re: Accessing 2 different databases in the same query ?  (Nagib Abi Fadel <nagib_postgres@yahoo.com>)
Ответы Re: Accessing 2 different databases in the same query ?  (Nagib Abi Fadel <nagib_postgres@yahoo.com>)
Список pgsql-general
On Monday 02 June 2003 10:39, Nagib Abi Fadel wrote:
> From what i read dblink let's us access another database in the same query
> ... Which is great. But does it slow down the query ??

What do You mean slow down ? In compare to what ?
If You question was is such query slower than the query on tables in local
database, the answer is YES.  Let me describe the mechanism of dblink:
    Your backend process becomes client of another backend (on same or different
server). dblink establishes connection to remote database, executes the
query, and send data to Your backend.

I use dblink over slow ISDN connection, so You can figure out how slow it can
be, but that is the beauty of dblink: You can query servers that are anywhere
on the network !

> And what about making references between tables (creating foreign keys) is
> it possible ?????
>

No, but you can create "remote view" using dblink and then do the same thing
using triggers(foreign keys are just specific triggers).
There are few samples in dblink documentation - check them out !

Regards !

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Accessing 2 different databases in the same query ?
Следующее
От:
Дата:
Сообщение: Re: Triggers and Function's