473,756 Members | 2,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Showing disk usage of innodb tables?

Gh!
How can I see how much disk space is being occupied by an InnoDB table?

Looking into /var/lib/mysql doesn't seem to work anymore for InnoDB tables.

Please tell also if there is a way to see how much space is occupied by
a particular row or column of a table.

Thanks
Sep 28 '05 #1
1 5145
Gh! wrote:
How can I see how much disk space is being occupied by an InnoDB table?

Looking into /var/lib/mysql doesn't seem to work anymore for InnoDB tables.
The default configuration is for all InnoDB tables to share one
tablespace, which may consist of multiple files, but each table is
spread throughout the tablespace in a unpredictable manner.

Read this page in the docs:

http://dev.mysql.com/doc/mysql/en/in...ile-space.html

But you can also initialize the InnoDB tablespace to store each table in
a separate file.

Read this page in the docs:
http://dev.mysql.com/doc/mysql/en/mu...blespaces.html

This still doesn't tell you how much space is occupied by a given table,
because typically the files do not shrink, even if you delete a lot of
records. The space inside in marked as free -- i.e., available for
storing record versions created by future inserts or updates.

You can get a report of the free space in a tablespace with the SHOW
TABLE STATUS command (or mysqlshow --status databasename). If you use a
shared tablespace (the default), the report is for the whole shared
tablespace. If you use separate files for each InnoDB table, the report
is for the free space in the corresponding file.

Read this page in the docs:
http://dev.mysql.com/doc/mysql/en/sh...le-status.html
Please tell also if there is a way to see how much space is occupied by
a particular row or column of a table.


I don't know of a good way to get this information. You could create
another table and copy an individual row or column into it, and then get
space statistics on that table, but it might not match the space usage
of the original table precisely, because of differences in InnoDB file
fragmentation, etc.

Regards,
Bill K.
Sep 28 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
15188
by: Mark Depenbrock | last post by:
--Apple-Mail-2--68472726 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Can not make mysql connection - error log: 030708 08:53:48 mysqld started
0
2488
by: Asif Iqbal | last post by:
Hi I am running MySQL 4.0.13 with my-medium.cnf (attached) on a Solaris 8, 4x450 Mhz, 4gb RAM. All my tables are InnoDB. Currently my ibdata1 is 1.8 gb. I have about 1 gig space left on the same partition. Also it is excruciatingly slow now. How do prevent the ibdata1 from filling up the disk partition ? How do I increase the speed on my MySQL? Please help. port = 3306
0
1991
by: Rob Baxter | last post by:
I have a linux server which is hosting several very large (~20GB) databases. In order to save some disk space I dropped an index on one of the larger (InnoDB) tables because it is no longer needed. It took about 30 minutes for MySQL to drop the index, during which time I saw the free disk space decrease. I didn't think anything of it while the drop operation was running because I figured it was some kind of temp file being used by the drop...
0
710
by: Lazy70 | last post by:
Hi to everyone, Ihave a hard problem to resolve. In my Mysql database there is sometihng that doesn't work. With MySQLFront I have all my InnoDB tables with this comment: "Can't open file: 'certificatetype.InnnoDB'. (errno: 1)"
3
949
by: Andy Tran | last post by:
I built a system using mysql innodb to archive SMS messages but the innodb databases are not keeping up with the number of SMS messages coming in. I'm looking for performance of 200 msgs/sec where 1 msg is 1 database row. I'm running on Red Linux: 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i686 i686 i386 GNU/Linux The machine has dual CPU and 2G of RAM.
2
2924
by: Jan | last post by:
I am using Apache2triad 1.2 as local development environment. It is working fine, but I cannot create InnoDB tables with the phpMyAdmin 2.5.6 included in this package. According to the my.ini file (see below) some lines in this file must be commented or uncommented to use innoDB. If I do this, the mySQL server does not start any more. Thanks for your help Jan
0
1314
by: Mike Chirico | last post by:
Hopefully the following will be useful or interesting: TIP 29: An example of using referential integrity with InnoDB tables. Referential Integrity with InnoDB tables. STEP 1 (First create the tables as InnoDB) CREATE TABLE agents (
3
11421
by: Reuben Pearse | last post by:
Hi all, I've just converted the tables in a big database (approx 27 million records) from MyISAM to InnoDB. When I was using MyISAM I backed up the database by stopping MySQL and then copying the MYI, MYD, frm files in the database directory, and restored the database in the same way. Is there a similar way to backup and restore InnoDB tables, or do I have to use the InnoDB Hot Backup tool?
4
2948
by: Good Man | last post by:
Hi there I have a database with about 20 or so tables, maybe a few thousand rows in each. I am starting to do more complex things with my insertions etc, and I want to start to use transactions, so I imagine I should change some table types in the database from MyISAM to InnoDB. I know that InnoDB tables are a completely different beast than MyISAM in terms of data storage etc... ie: instead of using folders on the server, everything...
0
9456
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9843
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9713
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.