Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Estimate table size

Posted on 2006-06-19
7
Medium Priority
?
3,612 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 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1200 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 30

Assisted Solution

by:todd_farmer
todd_farmer earned 800 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

916 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