Solved

Estimate table size

Posted on 2006-06-19
7
3,602 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
Comment Utility
That depends on MyISAM or InnoDB table type?
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 300 total points
Comment Utility
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
Comment Utility
Sorry, missed that you specified InnoDB.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 30

Assisted Solution

by:todd_farmer
todd_farmer earned 200 total points
Comment Utility
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
Comment Utility
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]
Comment Utility
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
Comment Utility
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 Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now