Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How big can a MySQL database get before performance starts to degrade

At what point does a MySQL database start to lose performance?

  • Does physical database size matter?
  • Do number of records matter?
  • Is any performance degradation linear or exponential?

I have what I believe to be a large database, with roughly 15M records which take up almost 2GB. Based on these numbers, is there any incentive for me to clean the data out, or am I safe to allow it to continue scaling for a few more years?

like image 383
Grant Avatar asked Aug 04 '08 14:08

Grant


People also ask

How big is too big MySQL database?

You can't have more than 1000 columns. Your records can't be bigger than 8k each. These limits change depending on database engine.

Is there a limit to MySQL database?

MySQL has no limit on the number of databases. The underlying file system may have a limit on the number of directories. MySQL has no limit on the number of tables.

Does size of database affect performance?

The amount of data stored in a database has a great impact on its performance. It is usually accepted that a query becomes slower with additional data in the database.

How many rows is too much for MySQL?

The MySQL maximum row size limit of 65,535 bytes is demonstrated in the following InnoDB and MyISAM examples. The limit is enforced regardless of storage engine, even though the storage engine may be capable of supporting larger rows.


1 Answers

The physical database size doesn't matter. The number of records don't matter.

In my experience the biggest problem that you are going to run in to is not size, but the number of queries you can handle at a time. Most likely you are going to have to move to a master/slave configuration so that the read queries can run against the slaves and the write queries run against the master. However if you are not ready for this yet, you can always tweak your indexes for the queries you are running to speed up the response times. Also there is a lot of tweaking you can do to the network stack and kernel in Linux that will help.

I have had mine get up to 10GB, with only a moderate number of connections and it handled the requests just fine.

I would focus first on your indexes, then have a server admin look at your OS, and if all that doesn't help it might be time to implement a master/slave configuration.

like image 72
Nick Berardi Avatar answered Oct 24 '22 00:10

Nick Berardi