http://www.perlmonks.org?node_id=344389


in reply to Way of accessing data...

kiat, this is a question of trade offs. You have to answer two questions first, 1) how often does the "total number of membership" change and 2) how often does the "main web page" get accessed? Then consider the amount of CPU time it takes process the query to dynamically create the webpage versus the CPU time to serve up a static page along with the time it would take to update the static page.

Now that you have those numbers, figure out which one will take less overall CPU. I'm going to wager that unless your membership is a very fluid thing, it'll be cheaper to keep a static page and update it either from the account creation/deletion script or daily from a cronjob.

- - arden.

Replies are listed 'Best First'.
Re: Re: Way of accessing data...
by kiat (Vicar) on Apr 12, 2004 at 14:21 UTC
    Thanks arden! I like your point about tradeoffs. I didn't think of it that way - I was just wondering if one method is prefered over the other in a noraml setting. But now I've something more specific to weigh my options on.