GigaGlobe

Database Size and Limits

55 views Database Management
<h3>Understanding Database Quotas</h3> <p>Your hosting plan includes a specific allocation for MySQL databases. Understanding how database size is measured, monitored, and managed helps you avoid hitting limits that could impact your website's functionality.</p> <h3>How Database Limits Work</h3> <p>Your hosting account may have limits on:</p> <ul> <li><strong>Number of databases</strong> - The maximum number of separate MySQL databases you can create.</li> <li><strong>Total database storage</strong> - The combined disk space used by all your databases, counted toward your account's overall disk quota.</li> <li><strong>Individual database size</strong> - Some plans may set a per-database size limit.</li> </ul> <h3>Checking Database Size</h3> <p>You can check your database sizes in several ways:</p> <p><strong>Via DirectAdmin:</strong></p> <ol> <li>Go to <strong>MySQL Databases</strong> in DirectAdmin.</li> <li>The database list shows the current size of each database.</li> </ol> <p><strong>Via phpMyAdmin:</strong></p> <ol> <li>Log in to phpMyAdmin.</li> <li>Click on the database name in the left sidebar.</li> <li>At the bottom of the table list, you will see the total database size.</li> <li>Each table's size is listed in the <strong>Size</strong> column, along with any <strong>Overhead</strong>.</li> </ol> <p><strong>Via SQL query:</strong></p> <pre><code>SELECT table_name AS 'Table', ROUND(((data_length + index_length) / 1024 / 1024), 2) AS 'Size (MB)' FROM information_schema.TABLES WHERE table_schema = 'your_database_name' ORDER BY (data_length + index_length) DESC;</code></pre> <h3>Reducing Database Size</h3> <p>If your database is approaching its limit, try these strategies:</p> <ul> <li><strong>Clean up unused data</strong> - Remove old log entries, expired sessions, spam comments, and post revisions.</li> <li><strong>Optimize tables</strong> - Run the OPTIMIZE TABLE operation to reclaim fragmented space.</li> <li><strong>Archive old data</strong> - Export and remove data you no longer actively need but want to keep for records.</li> <li><strong>Review plugins</strong> - Some plugins (analytics, logging, caching) store large amounts of data. Disable or clean up plugins you no longer use.</li> <li><strong>Purge transients</strong> - WordPress transients stored in <code>wp_options</code> can accumulate significantly over time.</li> </ul> <h3>Monitoring Growth</h3> <p>Keep an eye on database growth by periodically checking sizes in phpMyAdmin. If your database is growing faster than expected, investigate which tables are largest and determine if the growth is normal or caused by a runaway process.</p> <div class="alert alert-info">Database size is included in your account's total disk usage. If you are running low on disk space, check both your file storage and database sizes to identify where the space is being used.</div> <div class="alert alert-warning">If your database reaches its size limit, applications may be unable to insert new data, which can cause errors on your website. Monitor your usage regularly and upgrade your plan if you consistently need more database storage.</div>
Need More Help?

Can't find what you're looking for? Our support team is ready to help.

Contact Support
Hi there! How can we help?