[Labs-l] Performance at tool-labs compared with TS

Kolossos tim.alder at s2002.tu-chemnitz.de
Sun May 5 22:07:37 UTC 2013


Hello, I speed it up [1], to good performance.
The source of the problem was not mysql and not SQL_CALC_FOUND_ROWS.
The problem was a loop with normal array handling of a 2 dimensional 
array. So I simplify [2] to [3] to speed it up from 5s to 0.1s. I lost 
some features I don't want to lose.

Newer saw such an effect before. Perhaps something strange in the php 
configuration?

Greetings Tim

[1]
http://tools.wmflabs.org/templatetiger/tt-table4-2.php?lang=alswiki&template=Gemeinde%20in%20Frankreich&where=&is=&&offset=170&limit=30

[2]
while($row = mysql_fetch_row($query)) {
	     	if ($ausgabe [$row[0]][$row[1]]=="" )
		{$ausgabe [$row[0]][$row[1]] =	$row[2];} else
            		{if ($format=="table")
			{$ausgabe [$row[0]][$row[1]].=	"<p>".$row[2];}	
                             else
			{$ausgabe [$row[0]][$row[1]] =	$row[2];}
		   	}	
}

[3]
while($row = mysql_fetch_row($query)) {

	$ausgabe [$row[0]][$row[1]] = $row[2];

}




Am 05.05.2013 17:09, schrieb Marc A. Pelletier:
> On 05/04/2013 07:37 PM, Kolossos wrote:
>> The queries directly on mysql-terminal are fast and seems not to be the
>> problem.
>
> That's the part that baffles me; the currently used DB instance is not
> well-tuned (being, as it is, a temporary stopgap) but I can think of no
> reason for a query from your tool taking any longer than one directly
> from the commandline mysql(!)
>
> Possibly, your hypothesis about SQL_CALC_FOUND_ROWS is on the nose; a
> quick google seems to report that on modern mysqls (including mariadb)
> it's actually a performance /downgrade/.  Can you try without it so we
> have a basis for comparison?
>
> -- Marc
>
>
> _______________________________________________
> Labs-l mailing list
> Labs-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/labs-l
>






More information about the Labs-l mailing list