Well, you are free to suggest a better advice. In the case of shards splitting into different servers, Quarry will have to implement a server / database selector [1], and processing data from two databases in a single query may not be possible at all, like currently in the case of tools-db and replicas, where all inter-host joins must happen in application space.

In any case, the question is how to do cross-wiki joins properly instead of emulating them with temporary variables, which what I have suggested may be how one would do it properly, when it works at least //in the foreseeable future//. (Yes, changing is a possibility but it’s not currently foreseeable whether or when it will happen.)

[1] https://phabricator.wikimedia.org/T76466

Zhuyifei1999

On Thu, Jan 18, 2018 at 9:39 AM Brad Jorsch (Anomie) <bjorsch@wikimedia.org> wrote:
On Wed, Jan 17, 2018 at 5:50 PM, YiFei <zhuyifei1999@gmail.com> wrote:
SELECT ... FROM `<database>`.`<table>`, like in https://quarry.wmflabs.org/query/24212. This should work in the foreseeable future, during which all the replica databases are accessible on the same server.

This is bad advice. Just last week[1] one of our DBAs warned this list that that ability is not guaranteed or supported, and changing that is indeed a possibility.

[1]: https://lists.wikimedia.org/pipermail/cloud/2018-January/000169.html


--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Wikimedia Cloud Services mailing list
Cloud@lists.wikimedia.org (formerly labs-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/cloud