Re: cross database queries?
Darren Duncan <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <[email protected]> |
On 2013.06.26 12:47 PM, John R Pierce wrote: > On 6/26/2013 12:29 PM, Andrew Snyder wrote: >> Thank you all for your replies. I am indeed talking about working with >> multiple back ends (oracle, mysql, or any valid DBI module) in the same query. > > thats never going to happen. DBI is not a sql processor, its just an > interface, the SQL is passed directly to the database server you're connected to Never say never! I'm working on a Perl-native engine right now, and it will not only be functionally complete internally but also has the option to federate to multiple back-ends, so then you can do what you want. > some databases have support for 'foreign data wrappers', where you can > explicitly setup a connection to another database then use tables on that > foreign database, so if you connected to a DB like this and got the FDW stuff > all working, you could maybe achieve what you want, but its almost never optimal > as the planner for the 'primary' database has no way to optimize JOIN operations > etc involving other databases. In the short term that might be a good bet though, try using an existing SQL database's FDW capabilities. -- Darren Duncan