Reply to The best way to traverse a tree

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация