|
Posted by Naich on 10/19/05 12:52
I've got a traditional LAMP setup, PHP4, MySQL3, running on Debian.
I'm going to be putting a comments section on my site, similar to
something like Slashdot, i.e. nested comments in a tree structure. My
question is - is it better to get the entire set of comments in one MySQL
call and then use PHP to sort out the tree or would it be more efficient
to go up the branches with multiple MySQL calls?
While the site isn't too heavy traffic-wise, I'm wary about too much MySQL
activity blocking the databases. On the other hand, with PHP being
interpreted, presumably it'll be tying up more CPU time if I sort out the
tree with PHP.
Any thoughts would be appreciated.
Cheers, Naich.
--
http://www.fuzzyblobs.com .......... My blurry pics.
http://www.maggenhoof.co.uk/thoday . Improving our new dump.
http://www.veggiefoodguide.co.uk ... Time for some nice food.
http://www.sodwork.com ............. Right. I've had enough.
Motto: Ambition is a poor excuse for not having enough sense to be lazy.
[Back to original message]
|