Re: [JDBC] Query with tables from 2 different databases inJava
От | Richard Broersma Jr |
---|---|
Тема | Re: [JDBC] Query with tables from 2 different databases inJava |
Дата | |
Msg-id | 394431.68251.qm@web31810.mail.mud.yahoo.com обсуждение исходный текст |
Ответ на | Re: Query with tables from 2 different databases inJava ("Bart Degryse" <Bart.Degryse@indicator.be>) |
Список | pgsql-novice |
--- 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.
В списке pgsql-novice по дате отправления: