What's the MySQL Storage limit?

When in the cPanel, I see “All premium accounts have upto 1GB of mysql storage.” What I would like to know, is what the limit is for free accounts, and is everyone of your 400 databases, added up to your limit, or is it a separate limit for each?

Hi and welcome to the forum

There is no hard limit on database size. We primarily watch how much processing power your database uses. So if you have a big database table, you should make sure you run fast, efficient database queries on it to prevent overloading the database server.

3 Likes

Like getting data once and storing the rest that’s not needed now as $vars?

It has less to do with what you do with the data in PHP, but more what your database contents and queries are structured like.

A simple lookup on primary key or a single index in MySQL is fast and efficient. Getting data from many different tables with many joins and subqueries, or using WHERE statements on columns without indexes, takes more effort by MySQL to do. Queries like that can become very slow and very expensive if they are executed on large tables.

A table with millions of rows where you do a lookup on the primary key is fine. A table with millions of rows where every query requires MySQL to scan every row manually is not fine.

2 Likes

So let’s say I do:

SELECT * FROM TableName

that would be bad? But if I do:

SELECT response FROM TableName

would be fine?

Depending how many columns that TableName has. * Will select all the columns so if that contains so much columns It’ll become a pretty problem. About second one it is better. Because it only picks respone column.

If you’ve too many rows in a table. You can use pagination to split results in multiple pages.

And Limit sql statement to select limited number of results.

3 Likes

OK that’s all I wanted clarity on. Thanks!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.