tak som spravil mansi testik:
[podtrzene]unbuffered query:[/podtrzene]
$start=microtime(true);
for($a=0;$a<100;$a++):
mysql_unbuffered_query('create table t'.$a.' (a int, b varchar(20));');
mysql_unbuffered_query('dro p table t'.$a);
endfor;
$time=microtime(true)-$start;
echo 'time: '.$time;
priemerny cas: 6.46
maximalna odchilka: 0.44
[podtrzene]query:[/podtrzene]
$start=microtime(true);
for($a=0;$a<100;$a++):
mysql_query('create table t'.$a.' (a int, b varchar(20));');
mysql_query('dro p table t'.$a);
endfor;
$time=microtime(true)-$start;
echo 'time: '.$time;
priemerny cas: 6.53
maximalna odchilka: 0.42
[podtrzene]begin query commit:[/podtrzene]
$start=microtime(true);
mysql_query('begin;');
for($a=0;$a<100;$a++):
mysql_query('create table t'.$a.' (a int, b varchar(20));');
mysql_query('dro p table t'.$a);
endfor;
mysql_query('commit;');
$time=microtime(true)-$start;
echo 'time: '.$time;
priemerny cas: 6.80
maximalna odchilka: 0.80
[podtrzene]begin unbuffered query commit:[/podtrzene]
$start=microtime(true);
mysql_unbuffered_query('begin;');
for($a=0;$a<100;$a++):
mysql_unbuffered_query('create table t'.$a.' (a int, b varchar(20));');
mysql_unbuffered_query('dro p table t'.$a);
endfor;
mysql_unbuffered_query('commit;');
$time=microtime(true)-$start;
echo 'time: '.$time;
priemerny cas: 7.31
maximalna odchilka: 0.61