Re: Accessing 2 different databases in the same query ?

From: Joe Conway <mail(at)joeconway(dot)com>
To: Nagib Abi Fadel <nagib_postgres(at)yahoo(dot)com>
Cc: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>, pgsql-general(at)postgresql(dot)org
Subject: Re: Accessing 2 different databases in the same query ?
Date: 2003-06-02 16:54:17
Message-ID: 3EDB8139.6000900@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nagib Abi Fadel wrote:
> Well actually the 2 databases are on the same machine, so i wanted to
> know if using the dblink for accessing 2 tables each one in a
> different database will dramatically slow down the query (specially
> if it's a join query), Comparing to a query on 2 tables on the same
> database. If it's the case i would consider replacing the 2 databases
> with one database, but does this have any disadvantage does it make
> queries slower if the database grow in size ???
>

dblink is using a client library and is therefore certainly slower than
backend heap access.

Whether the slowdown is "dramatic" or not, is a dependent on *your*
definition of dramatic, and the specifics of what you are trying to do.
I'd suggest you try it and find out.

If it's too slow to meet your needs, and you are able to combine the two
databases into two schemas of one database, then do that instead.

Joe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sean Mullen 2003-06-02 17:09:04 array [] vs {}
Previous Message scott.marlowe 2003-06-02 16:28:50 Re: The best