Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by JetBrains PhpStorm.
- * User: shelan
- * Date: 9/15/11
- * Time: 5:19 PM
- * To change this template use File | Settings | File Templates.
- */
- $username = "mahasen";
- $password = "mahasen2011";
- $host="shelanlkcom.fatcowmysql.com";
- $con = mysql_connect($host,$username,$password);
- mysql_select_db("uni_test_database", $con);
- $noOfIteration = 10;
- for ($i=1; $i<=$noOfIteration; $i++){
- $time1 = microtime();
- mysql_query("SELECT * FROM category_no");
- $time2 = microtime();
- $time1Diff = ($time2 - $time1)*1000;
- $totalTime1 = $totalTime1 + $time1Diff;
- echo '<BR>Parsing Time: for 1 st query' .($time1Diff/10). ' nanoSeconds.';
- }
- echo '<br>Average time for 1st query'.($totalTime1/$noOfIteration).' nanoSeconds'
- ?>
Add Comment
Please, Sign In to add comment