Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can MYSQL support databases with sizes around 4 GB? Will I have any performance issues?

I am planning to have a database of size more than 12 million records all of them in a single table and no other joins etc, used for search, filtered based on field names of the table, approximately 4 GB size in MYSQL backend and php frontend.

Question is can MYSQL support databases with sizes around 4 GB, Will I have any performance issue when I do a search using php

Will I be able to get results in atleast 30 to a 60 Secs

your suggestions please

like image 541
Ramji Avatar asked Jan 23 '10 05:01

Ramji


People also ask

Can MySQL support large databases?

MySQL was not designed for running complicated queries against massive data volumes (which requires crunching through a lot of data on a huge scale). MySQL optimizer is quite limited, executing a single query at a time using a single thread.

How much data is too much for MySQL?

Row Size Limit Examples 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.

How much RAM does MySQL database need?

The default configuration is designed to permit a MySQL server to start on a virtual machine that has approximately 512MB of RAM. You can improve MySQL performance by increasing the values of certain cache and buffer-related system variables.

Does size of database affect performance?

Yes. The size of the data under management affects performance. 0 rows runs faster than 1 row runs faster 1,000 rows.


1 Answers

Yes, you will have performance issues. Every application has database performance issues, even with much smaller databases than yours. You need to study and work to understand how to use the RDBMS technology to its best advantage.

The good news is that you can do it. A database of 4GB is not excessive, and many success stories involve databases that are much larger.

I suggest you start by studying the following resources:

  • Chapter 7: Optimization
  • High Performance MySQL, 2nd Edition by Baron Schwartz and others.
  • MySQLPerformanceBlog.com where the top MySQL performance consultants write.

Combining technology like the APC cache or Memcached with PHP and MySQL is also practically required for high-performance PHP applications. Because the fastest database query is the one you don't have to run (because the data is already in a cache).

We can't answer your question about getting query results in 30 to 60 seconds, because we don't know what type of queries you need to run. There are many other factors for performance. The naive and general nature of your questions indicates that you have a lot of study to do before you will be successful.

like image 134
Bill Karwin Avatar answered Oct 07 '22 22:10

Bill Karwin