Dear all,<BR>I am currently doing a messageboard just like the one in this website. However I am pretty worried about the performance of the algorithm. I am using a SQL to search all the mother message (non-reply message) and then use a while loop to loop though each record, seaching whether it has child message (reply message) or not, if there is, get the child record, and then check whether this child has child or not... so forth.<BR>Now, my algorithm works, but it seems a bit slow to me... With only 29 messages on the messageboard and the SERVER needs 2.5 seconds (worse case, usually the first time of getting to the page) to construct the page, and best case 0.44 second (after visited the page for several time -- the increament of performance should be due to the server caching). <BR><BR>My questions are<BR>1. Is this Looping / Recurrsive algorithm the best way of doing this kind of thing?<BR>2. Is the performance acceptable?