Solved

Estimate table size

Posted on 2006-06-19
7
3,608 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 30

Expert Comment

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

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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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 143

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

624 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