Page 1 of 1

PHP Speed

Posted: Thu Aug 18, 2005 1:43 pm
by blindchild
Hi,
I was just wondering if there are any factors to take into account to get a php site to work quickly. Im putting myself through the motions just trying to learn php and to experiment with what it can do. But my site seems to be functioning very slowly, the other non-php related pages on my site work fine.
What could be the reason for this and what can I do to combat it?
Thanks
Ross
PS. http://www.blindchild.com/blog is my address. Thanks again.

Posted: Thu Aug 18, 2005 2:40 pm
by Roja
benchmark it.

Most likely, its due to SQL calls, or dns resolution issues. Those two are the biggest slowdowns in php development, imho.

But don't take anyones guess as correct - benchmark portions of the page, and see where the delay is.

Posted: Thu Aug 18, 2005 7:19 pm
by raghavan20
consider using indexes atleast for one column in a table which you think you would use the most.
try some tutorials in phpbuilder.
try to retrieve fields that are necessary.
ex: common mistakes with ppl new to sql
assume Users_tbl has 10 fields in it and dont use select * from Users_tbl instead select col1,col2..coln from Users_tbl
I used to make the same kind of mistakes when I was new to sql :?