Solved

Get size of MySQL table

Posted on 2007-11-13
8
6,353 Views
Last Modified: 2008-01-09
How do I get the size of a MySQL table?
0
Comment
Question by:allelopath
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 4

Accepted Solution

by:
jcoombes earned 350 total points
ID: 20275295
If you want the number of rows, then just

select count(*) from table

will do it.

If you want the physical size of the table then:

SHOW TABLE STATUS

might do what you want, see here:  http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html
0
 
LVL 9

Expert Comment

by:ysnky
ID: 20275489
>>size of a MySQL table
what do you mean?
0
 
LVL 9

Assisted Solution

by:ysnky
ysnky earned 150 total points
ID: 20275536
for "show table status" usage in php;
http://www.modwest.com/help/kb6-199.html
0
 
LVL 1

Author Comment

by:allelopath
ID: 20275623
by table size I want to know how much space the data I have in there is occupying.

show table status shows a data_length of 15,800,991,744 (almost 16 gb)

I'm confused in that here:
http://jeremy.zawodny.com/blog/archives/000796.html
says that the limit is 4 gb.
The article is 4 years old, so it may be obsolete.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 92

Expert Comment

by:objects
ID: 20275723
limit isn't 4gb, i have mysql tables over 50gb
0
 
LVL 9

Assisted Solution

by:ysnky
ysnky earned 150 total points
ID: 20277958
0
 
LVL 1

Author Comment

by:allelopath
ID: 20280541
How do I determine if the win32 system is FAT or NTFS?
0
 
LVL 4

Assisted Solution

by:jcoombes
jcoombes earned 350 total points
ID: 20280804
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
countPairs challenge 7 58
wordappend challenge 8 85
Core Java. What output will be and why ? 6 58
mockito example issue 8 35
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

758 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

24 Experts available now in Live!

Get 1:1 Help Now