intervision
asked on
Mysql Server Big databases - slow....
Hello,
I'm running a website with an mySQL server.
There is a really big database there,and the site working really slow because of that most of the time.
The site is on a dedicated server PIII 700 mhz with 256 ram , scasi hd.
What can be done ?
Thank you
I'm running a website with an mySQL server.
There is a really big database there,and the site working really slow because of that most of the time.
The site is on a dedicated server PIII 700 mhz with 256 ram , scasi hd.
What can be done ?
Thank you
ASKER
~2000 tables and lots of records...
The OS is RH6.1
The OS is RH6.1
Are you using indexes?
Ant
Ant
ASKER
yes. i do use indexes
Is all that data really needed? Or could it be archived?
Ant
Ant
ASKER
all data needed :-)
you can try caching. for example instead of querying the database for each request, possibly several times a second, only query the database every second and serve static pages that are less than a second old.
ASKER
how can i cach ?
In your program check the time since the last query if its too soon then serve static pages otherswise do the query.
Also make sure you account for race conditions as you don't want multiple people querying for the same page and having mysql running two queryies that will return similar results
Also make sure you account for race conditions as you don't want multiple people querying for the same page and having mysql running two queryies that will return similar results
if you do a lot of updates, updating indexes can be a powerful bottlneck
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- PAQ'd and pts removed
Please leave any comments here within the
next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
Nic;o)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How "big" is "big"? What I mean is how many tables and how many records are in the database?
Are you using indexes? If not that would be the first way of speeding things up.
Ant