Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently intend on running my server on a 20GB server. The server is mostly just having a LAMP stack, with ubuntu.

The data will mostly be held in a large table(about 50 columns) The question is, given that about 1 GB is used for other server stuff, how much data can this table hold?

The table holds about 6 varchars with about 64 characters each. About 10 integer values and rest are binary values. How much rows can this fit? Help is highly appreciated

share|improve this question
    
Do you have any indexes? They take up space too. Sometimes more than the table. –  Ladadadada Sep 14 '13 at 8:05
    
Three indexes, all on varchars. (Also a primary int id) –  Aayush Agrawal Sep 14 '13 at 8:13
add comment

3 Answers

up vote 0 down vote accepted

The best way to get this done is use

  SHOW TABLE STATUS [{FROM | IN} db_name]
  [LIKE 'pattern' | WHERE expr]

You will get all the info about the table .

share|improve this answer
add comment

Sorry if I sound mean or stupid, but couldn't you install MySQL in your desktop or whatever other server, import/simulate your database content with all the indexes and so on in place, and actually see how much space it allocates, instead of just guessing? :)

Anyway, anything measured in that little numbers shouldn't be a problem for MySQL itself; it's another question if the SQL queries and your application itself are properly done.

share|improve this answer
add comment

You could run this query:

SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
FROM information_schema.tables
GROUP BY table_schema;

Or you could go in /var/libs/mysql/ directory and check size of directories containing database files with the command du -sh *

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.