Back when I really got started with this whole Web mess, I learned how to build database-backed websites. However, it was always assumed that these sites would be built by having a bunch of code on the server which generated pages for the user on demand by calling the database. That was simply how such sites were built, I never questioned it.
That was up till about a month ago. I changed the way my blog worked from purely dynamic pages to what I call “mock dynamic” pages. I had a series of scripts which generated every page upon my posting into static content, without headers or footers. Then simply my root page (index.php, in my case) simply read the directories and loaded the data with headers. The data, is still stored in a database, for when I edit/delete a post, but upon hitting my submit button, my little script would rebuild the whole site with static pages. This prevented load on my database. Yes yes I don’t get tons of traffic (300 or so visitors daily for this blog), but I’m obsessed with efficiency.
Not only less load on my database, saving my queries, but my site is compatible if I change hosts. I can nearly always switch servers and software and they’ll still work. Plus, I get the advantage of the great features built into my web server, like content-negotiation, caching, etc. I don’t get the bells and whistles like providing a personalized greeting (even though its possible, with sessions) on every page, but those are pretty dumb anyhow.