Is it possible to do a cross JOIN mechanism (i.e. Cross DBs that are located on different machines) in mySQL?

I know that in SQL Server this is possible with linked servers. Is there a similar way to do this in mySQL?

Thanks!

0


a source to share


2 answers


You can take a look at the federated storage engine . I don't know its stability, but it should support something like this.



+2


a source


Yes, possibly with an engine Federated Storage

, as Olafur Vige states in his answer. This storage engine must be invoked explicitly (by making an appropriate entry in the startup file), but you can customize the "shadow" tables locally from those you want to query remotely. But beware: performance might not be all that great - in recent tests, I ran a local query with a remote table (via my federated table), ended up doing all the table content over the wire, and then running the query, apparently without accessing the indexes that exist on the remote table (although they were defined on the joined table). As a result, a simple query that took about 10 seconds remotely had to be aborted after about an hour when running against a joined table.



0


a source







All Articles