Mysql optimization

software development

#1

I was wondering if any of you knew of any optimization techniques? Or any other sly tricks to help lay off constantly using the database…

A friend wants me to help design a high-traffic forum site (for her organization) and the only thing I can come up with is precaching key pages…
Basically any time the content changes on the root index page, high traffic pages, and mostly static pages change then I have a new copy of it generated and saved to the server to help cut down on constantly trying to connect to the database. Is this a bad/good idea?

I just know that since my site is so heavily database driven, that if the database went down, then so would the whole site. I think this trick would keep 60-80% of the site up in the rare case of a database outage.

Anyways let me know what you think!

I just know I don’t want to get on dreamhost’s “naughty list” for making to many sql queries and having there little count go up


#2

[quote]
[…lots of db queries…]
I just know that since my site is so heavily database driven, that if the database went down, then so would the whole site.
[…]
I just know I don’t want to get on dreamhost’s “naughty list” for making to many sql queries and having there little count go up[/quote]
Almost all of my sites require the database to be running; I s’pose I could use textfile-based shopping carts but I’m definitely not in the mood to reprogram that little hassle.
As far as excessive queries are concerned, I’m not so sure that should be a big problem unless you’re doing something like storing media files as BLOBs or the like; simple text-based queries shouldn’t put all that much of a strain on the system (or at least it seems to’ve not disturbed any of my db-driven sites as yet).