News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Dublish.com:
Simple Optimization for PHP and MySQL
June 22, 2006 @ 12:32:31

Dublish.com has this post from a little while back with some good tips on how to squeeze the most out of your MySQL and PHP scripts with some simple, handy tips.

The MySQL list includes things like:

  • MySQL is interpreted from right to left so you should put the most significant limiters as far to the right as possible.
  • Use indexes on the columns in the WHERE clause and on the columns you want to ORDER BY.
  • Sometimes mysql_free_result() end up wasting more memory than it saves. Check the difference with memory_get_usage().
  • Use NOT NULL as default value as much as you can, it speeds up execution and saves one bit.

And the PHP list includes:

  • When echoing strings it's faster to separate them by comma instead of dot.
  • Unset your variables to free memory, especially large arrays.
  • Many code blocks might slow down the interpretation a little bit.

There's also all sorts of other tips down in the comments as well.

0 comments voice your opinion now!
mysql optimization simple tips tricks mysql optimization simple tips tricks


blog comments powered by Disqus

Similar Posts

Vexxhost.com: Top 5 new (and cool!) features in PHP5 that you probably haven't heard of

Job Posting: Bullseye Creative Seeks a PHP/MySQL Coder & Web Designer

Internet.com: Plotting Map Markers Dynamically Using the Google Maps API, jQuery, PHP, and MySQL

Ryan Malesevich's Blog: WP Plugins: WP-Wap, Make a WAP Version of Your Blog

Royal Pingdom: What the Web's most popular sites are running on


Community Events





Don't see your event here?
Let us know!


introduction zendserver interview bugfix voicesoftheelephpant language community tips series library api symfony framework podcast list release laravel deployment developer conference

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework