Have you tried using several concurrent db connections instead of one
connection & `use` statements? I'm just curious how costly it is (cpu/mem).


On Sun, Sep 1, 2013 at 8:02 PM, Jesse (Pathoschild)
<[email protected]>wrote:

> Hello,
>
> I noticed a performance issue with tools that query data from many wikis.
> I open connections to each DB slice, then do a "use `dbname`" to switch
> to each wiki for the relevant queries. This is *very* slow on Tools Labs;
> does the Tools Labs infrastructure make "use `dbname`" significantly
> slower? Is there a more efficient way to do this?
>
> I created a simple script which reproduces the issue. It runs in 0.3
> seconds on the 
> Toolserver<https://toolserver.org/~pathoschild/accounteligibility/test.php>(
> source <http://pastebin.com/ctUQsXZm>), but takes a whopping 23 seconds
> on Tools 
> Labs<http://tools.wmflabs.org/pathoschild-contrib/accounteligibility/test.php>(
> source <http://pastebin.com/Xi3abGFP>). The scripts shows the profiling
> results at the bottom of the page (click the [+] next to "*Page generated
> in XX seconds*").
>
> --
> Jesse Plamondon-Willard (Pathoschild)
>
> _______________________________________________
> Labs-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/labs-l
>
>


-- 
З павагай,
Павел Селіцкас/Pavel Selitskas
Wizardist @ Wikimedia projects
_______________________________________________
Labs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/labs-l

Reply via email to