IT Community - Software Programming, Web Development and Technical Support

How to calculate the table size in mysql

This is a discussion on How to calculate the table size in mysql within the Database Support forums, part of the Web Development category; Hi, can someone explain me about how to calculate a particular table size created in a mysql database ?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 07-11-2007, 06:59 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default How to calculate the table size in mysql

Hi, can someone explain me about how to calculate a particular table size created in a mysql database ?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-11-2007, 07:08 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: How to calculate the table size in mysql

do u mean the file size of the table ?.. If it's you can query the details from information_schema tables. Consider the below example...

Let's assume that the database name is 'emp_database' and table name is 'emp_master'

--
SELECT table_schema,
table_name,
ROUND(data_length/1024/1024,2) total_size_mb
FROM information_schema.tables
WHERE table_name = 'emp_master' AND table_schema = 'emp_database';

---------------------------------------------
table_schema | table_name | total_size_mb
---------------------------------------------
emp_database | emp_master | 2.57

--

Check out this...
__________________
Keep smiling...

Last edited by priyan : 07-11-2007 at 07:10 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the difference between DELETE TABLE and TRUNCATE TABLE commands in SQL Server oxygen Database Support 6 11-23-2007 05:17 AM
Mysql - Table Join write2ashokkumar Database Support 2 09-14-2007 05:12 AM
What are the different tables present in mysql, which type of table is generated when oxygen Database Support 2 07-26-2007 02:37 AM
Setting Index for mysql table fields Jeyaseelansarc Database Support 4 07-15-2007 10:22 PM
calculate the PR in sites? krawner Search Engine Optimization 6 05-19-2007 10:06 PM


All times are GMT -7. The time now is 12:38 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
Stamford Dentist | Euro Millions Lottery | Tech Support Services

SEO by vBSEO 3.0.0