Solved

Estimate table size

Posted on 2006-06-19
7
3,605 Views
Last Modified: 2008-01-09
Need some help in submitting a proposal.

Lets assume i have a table ,type InnoDb, with hte following structure
column1  int
column2  int
column3  varchar(200)
column4  char(1)
column5  int
column6  text
column7  datetime
column8  datetime

how do i calculate the table size for this table ? The table will have one foreign key and one index. How do i estimate the database size given that there are six such tables and the company estimates that each table will hold minimum 50000 records. What would be the ideal database server configuration,a estimate, for such a scenario, assuming 250-500 concurrent users.
0
Comment
Question by:sajuks
7 Comments
 
LVL 30

Expert Comment

by:todd_farmer
ID: 16935805
That depends on MyISAM or InnoDB table type?
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 300 total points
ID: 16935813
6*50'000*(4+4+x1+1+4+x2+6+6+6+6)

x1 being the average size of column3, and x2 being the average size of column6
the last +6+6 is the overhead for the indexes, assuming they are on the int-typed columns
0
 
LVL 30

Expert Comment

by:todd_farmer
ID: 16935820
Sorry, missed that you specified InnoDB.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 30

Assisted Solution

by:todd_farmer
todd_farmer earned 200 total points
ID: 16935836
I think that angelIII's response is valid for MyISAM.  I'm not sure that it applies to InnoDB, but could provide a reference point for a mimimum disk space required.

http://dev.mysql.com/doc/refman/5.0/en/innodb-file-space.html
0
 
LVL 33

Author Comment

by:sajuks
ID: 16936021
i would appreciate your opinion on what you guys feel should be the recommended database server configuration ...
ram, cpu , and so on.
 
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16937390
well, if you can put RAM size >= Database Size, the db will fit entirely into the memory, and hence will minimize disk access (of course, except the first queries will need to read the table data...)

CPU, well, the faster, the better. The more CPU, the better (having 2+ "slower" CPU is better to have 1 fast cpu)
 
DISK: of course, redundant fault-tolerant disk systems are preferable. RAID5 or RAID10, but RAID1 could be fine also.

0
 
LVL 22

Expert Comment

by:NovaDenizen
ID: 16937717
6 tables * 50000 records * (40 + avg(length(column3)) + avg(length(column6))) =
12 million + 300000 * (avg(length(column3)) + avg(length(column6)))

With the wild-guess assumption that the column3 and column6 average 300 bytes total, the database will require, in total, about 100 megabytes.  The whole thing would easily fit in RAM.  

The system could still be slowed down by locking and transaction commits being written to disk.  It depends on the read-write ratio and what kind of flush settings you will tolerate.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mySQL. SQL query. Substitute for Numeric key word. 3 65
PHP: Insert Data into MySQL 5 42
Excel - SQL export question 3 43
Creating Functions in phpMyAdmin 8 20
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question