<div dir="ltr"><div>Hello,</div><div><br></div><div>I noticed a performance issue with tools that query data from many wikis. I open connections to each DB slice, then do a "<font face="courier new, monospace">use `dbname`</font>" to switch to each wiki for the relevant queries. This is <i>very</i> slow on Tools Labs; does the Tools Labs infrastructure make "<font face="courier new, monospace">use `dbname`</font>" significantly slower? Is there a more efficient way to do this?</div>

<div><br></div><div>I created a simple script which reproduces the issue. It <a href="https://toolserver.org/~pathoschild/accounteligibility/test.php">runs in 0.3 seconds on the Toolserver</a> (<a href="http://pastebin.com/ctUQsXZm">source</a>), but <a href="http://tools.wmflabs.org/pathoschild-contrib/accounteligibility/test.php">takes a whopping 23 seconds on Tools Labs</a> (<a href="http://pastebin.com/Xi3abGFP">source</a>). The scripts shows the profiling results at the bottom of the page (click the [+] next to "<i>Page generated in XX seconds</i>").</div>

<div><br></div><div>-- <br></div><div><div dir="ltr">Jesse Plamondon-Willard (Pathoschild)</div></div>
</div>