Forum Moderators: coopster

Message Too Old, No Replies

Optimizing for SPEED

PHP with MySQL database

         

grnidone

7:19 pm on Feb 3, 2003 (gmt 0)



I am making a huge informational site (8,000+ pages) with MySQL as the database and PHP as the scripting language.

I read "Fastest Scripting Languages" [webmasterworld.com] and from it have concluded much of the speed of a web site depends on how fast the server hosting it is and how fast the internet connection it has to the world.

The problem is, I don't have a blazing fast server or the fastest internet connection for it to connect to the world. It is just not possible at this time to upgrade. Therefore it is imperative to optimize the code as much as I can for speed.

Visitors to the site will need to be able to search the site, but that will be about the extent of their interaction with it. The site will be question and answer type stuff, and because of that will need to be heavily cross linked in the database. For example, one answer could work for questions in many different categories.

What tips can you all give me to make this code and database set up blazing FAST with the limitations I have?

Nick_W

7:33 pm on Feb 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Smarty Template Engine [smarty.php.net]

You can turn cacheing on and it will keep the pre compiled templates in cache instead of constantly querying the DB.

Nick

jatar_k

7:42 pm on Feb 3, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



have php compiled as an apache module as opposed to cgi and look into the Zend Optimizer [zend.com]. This will help php run much faster.

daisho

9:26 pm on Feb 4, 2003 (gmt 0)

10+ Year Member



Zend Optimizer costs money. A freeware alternative is IONCubes PHP Accelerator.

grnidone

10:13 pm on Feb 8, 2003 (gmt 0)



What about the database itself? Is there anything in the setup that will cause pulling the data out of it to be a slow process?

Nick_W

10:20 pm on Feb 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Providing your tables have indexes I don't see an issue (although that's very general as I can't see the code).

Go with a template system that caches the results of db queries like the one I linked to above...

Nick