Solved

Estimate table size

Posted on 2006-06-19
7
3,603 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
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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
A short film showing how OnPage and Connectwise integration works.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

14 Experts available now in Live!

Get 1:1 Help Now