0

I am running a website and I have reached a lot of users on the website. Now the issue that I am facing is that there is a single table for incoming and outgoing messages. When the size of this table of messages reaches more than two million, the website becomes very slow.

Please tell me what is the solution of this problem?

my website is send sms to pakistan

my server configuration is 1 gb ram 786 ghz processor 200 gb hard

2
  • What storage engine are you using for the table? Commented May 9, 2011 at 17:19
  • INNODB is the storage engine i guess ... Commented May 9, 2011 at 19:37

2 Answers 2

2

There is no one size-fits-all solution to fixing your database. Sharding could help, but for just 2 million or so I would expect the issue to be mostly poorly written queries and a lack of indexes. Use EXPLAIN and the query analyzer to figure out what your DB is doing and then throw some indexes on it. Upgrading to a server with 1 or 2ghz would also be a relatively cheap way to get better speed.

Sign up to request clarification or add additional context in comments.

Comments

1

You could probably benefit from adding indexes to your tables and be sure your queries are using those appropriately.

Optimizing MySQL: Queries and Indexes is a good article covering the basics and other things you can do to analyze the slow queries of your site.

2 Comments

What if the access is write-heavy? How well does MySQL handles concurrent INSERTs? Does it depend on the storage engine?
Mysql has option like delayed insert, that could help here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.