For awhile now I’ve been thinking that, my long time hosting provider, has been falling down on the job. The performance of this site has seemed rotten to me, and I assumed that it was a problem with the database server because static pages fly onto the screen as they should. I then realized that a phpBB installation that I’m running works perfectly fine. It was then that I realized that the problem was somewhere in my code.

It’s a good thing I didn’t migrate to a different hosting provider over this (I had had considered it). The problem is that the code that displays the items on the home page pulled up all of the items I’ve ever posted and then grabbed the ones from past five days with posts. Pulling them all up insured that under no circumstances would I ever not have five days of posts on the front page, even if they were one year apart or something. Anyway, now that I have literally thousands of items in the database, that query was taking a long time, even though it never wants more than a few items. I set up the where clause so that it now only grabs items from the past 14 days, and that seems to have made things much better. Given the posting history for this site, users shouldn’t see any difference other than improved performance.