in reply to Re: Technique Efficiancy
in thread Technique Efficiancy

Good post; one comment/observation: if you have to go to the database to get a timestamp, and make a system call to get the file timestamp, that overhead may cancel out any gain from avoiding the sql select(s) required to build the page dynamically.

Other replies here made the case articulately for having the content be in the database and the page built dynamically.

There are lots of subtleties, exceptions, etc., but as a first appoximation, one sql statment will usually be at least as much of a performance hit as everything else you do to build a web page. A select to get one field (i.e., timestamp) from a row and fetching html from the file system is going to be as much of a hit as selecting the whole row (assuming your row isn't many kb) and building your page on-the-fly.

The sql performance hit for a keyed, single-row select is not based on band-width, but on the overhead of communicating with the sql engine. And it's probably an order of magnitude worse if you aren't maintaing db connections across page requests.

Replies are listed 'Best First'.
Re: Re: Re: Technique Efficiancy
by little (Curate) on Apr 22, 2001 at 00:23 UTC
    but you don't need to compare on each page request - only if you update your data. Sorry, if I didn't state that clearly :-)
    But I assume here your observation is wrong!
    Continuing the tool documentation that would mean, that you might update the data may be once a week or once a month. So all queries to the DB would waste capacity, or not? If no data changed, we don't need to change the document and so we don't need to process the output for each requesting client.
    The only concern I have is the use of SSI. That is the point where I am afraid to loose time and if it wouldn't be better to compose the documents upon content creation.

    Have a nice day
    All decision is left to your taste