View Single Post
Old 12-04-2012, 04:34 PM   PM User | #4
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
You should try benchmarking your script and finding where the bottleneck is in the script.
The bottleneck is ussually in the database so you should have super optimized queries. Use MySQLi(MySQL Improved) or PDO which is much faster and prepared statements for security and caching of queries (http://php.net/manual/en/mysqlnd-qc....rt.caching.php).

What will help you a lot in benchmarking is the microtime() or XDebug tool(http://xdebug.org/docs/profiler).

PHP Code:
$start_time microtime(TRUE);
 
//The Query you want to test

$end_time microtime(TRUE);

echo 
"Query 1 took : "$end_time $start_time."microseconds"
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk

Last edited by Redcoder; 12-04-2012 at 04:37 PM..
Redcoder is offline   Reply With Quote