Created
October 10, 2012 02:22
-
-
Save dvidsilva/3862785 to your computer and use it in GitHub Desktop.
tells you how much it would take to add several lines in your db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
ini_set('max_execution_time',0); | |
//tells you how much it would take to add several lines in your db, change ur password and all that off //course.. | |
//_GET[i] is the ammount of lines | |
$time_start = microtime(true); | |
$sql = mysql_connect('localhost','root','magic'); | |
mysql_select_db('test',$sql); | |
mysql_set_charset('utf8'); | |
for($i = 0; $i < $_GET[$i]; $i++ ){ | |
$data = mysql_query('insert into trial1 set name = MD5(RAND()) ')or die(mysql_error()); | |
} | |
$time_end = microtime(true); | |
$time = $time_end - $time_start; | |
echo "Did $i in $time seconds\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment