Re: How to find size of my database
On Wed, 03 May 2006 Rhino wrote : Daniel de Veiga has already answered you on how to determine the size of your database by using the file system and simply looking at the size of the physical files in your database. Another possibility is that you could use the SHOW TABLE STATUS command in MySQL. If you go to your MySQL prompt and select a database, then use the SHOW TABLE STATUS command, like this: set tmp; show table status like '%'; you'll find a column called Data_length which tells you the length of the data file for each table. If you simply add the size of each table in the database together, you should have the size of the whole database. Please note that I'm not sure how accurate my suggestion is; you might find that Daniel's approach gives you a better answer. I'm not sure if the Data_length column considers all the overhead that you might have with a table, such as index sizes, pointer sizes, unusable space, etc. Perhaps someone else can jump in with a better approach; I'm inclined to think it can't be quite as easy as I suggested. I'll jump in for you.. Indeed, you are right that Data_length that does not cover space allocated but unused (i.e space freed up by DELETE or UPDATE statements that is not released back to the filesystem, before an OPTIMIZE TABLE for example). There are other columns within the output however - Data_free and Index_length. Therefore to get the total allocated space to a database: SUM(data_length) + SUM(index_length) Total of actual data: (SUM(data_length) - SUM(data_free)) + SUM(index_length) Allocated but unused: SUM(data_free) Also, even if the Data_length column gives an accurate answer for the size of a table, it is rather tedious to have to execute the SHOW TABLE STATUS command and then manually sum up the various sizes. I don't think you can simply execute an SQL query that does all the work for you, which is very unfortunate. Unfortunately within 4.0 there is no way to do this with a SQL query. You can do this on 5.0 however. For example: SELECT s.schema_name, CONCAT(IFNULL(ROUND((SUM(t.data_length)+SUM(t.index_length)) /1024/1024,2),0.00),Mb) total_size, CONCAT(IFNULL(ROUND(((SUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free))/1024/1024,2),0.00),Mb) data_used, CONCAT(IFNULL(ROUND(SUM(data_free)/1024/1024,2),0.00),Mb) data_free, IFNULL(ROUNDSUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free)) /((SUM(t.data_length)+SUM(t.index_length)))*100),2),0) pct_used, COUNT(table_name) total_tables FROM INFORMATION_SCHEMA.SCHEMATA s LEFT JOIN INFORMATION_SCHEMA.TABLES t ON s.schema_name = t.table_schema WHERE s.schema_name = sakila GROUP BY s.schema_name ORDER BY pct_used DESC\G *** 1. row *** schema_name: sakila total_size: 6.62Mb data_used: 6.62Mb data_free: 0.01Mb pct_used: 99.91 total_tables: 22 1 row in set (0.08 sec) It is entirely possible that there is a MySQL command that gives you the actual size of each database directly, although I didn't find it when I searched the manual. Again, perhaps someone with more administrative experience with MySQL can suggest a better approach. If not, perhaps we need to make a feature request of the MySQL people :-) This would appear to be a very useful command to create if it doesn't already exist! I have a little administrative experience ;) I'm going to confuse the matter now, as the above reports freespace correctly for storage engines such as MyISAM, however, it does not report the freespace properly within Data_free column for InnoDB tables - the freespace is reported at the *tablespace* level, within the Comment column of SHOW TABLE STATUS and INFORMATION_SCHEMA.TABLES. There are a couple of other relatively undocumented features within InnoDB that allow you to dump this kind of information - called the InnoDB Monitors: http://dev.mysql.com/doc/refman/5.0/en/innodb-monitor.html If you create the following table for a short period of time, the internal contents of the InnoDB data dictionary will be dumped out to the error log: create table innodb_table_monitor (a int) engine = innodb; Then drop the table after a minute or so (otherwise it will dump continuously). This will dump a wealth of information on all of the tables within InnoDB (for all databases), here's an extract on one of our sakila tables: TABLE: name sakila/rental, id 0 26, columns 11, indexes 5, appr.rows 16305 COLUMNS: rental_id: DATA_INT len 4 prec 0; rental_date: DATA_INT len 8 prec 0; inventory_id: DATA_INT len 3 prec 0; customer_id: DATA_INT len 2 prec 0; return_date: DATA_INT len 8 prec 0; staff_id: DATA_INT len 1 prec 0; last_update: DATA_INT len 4 prec 0; DB_ROW_ID: DATA_SYS prtype 8 len 6 prec 0; DB_TRX_ID: DATA_SYS prtype 8 len 6 prec 0; DB_ROLL_PTR: DATA_SYS prtype 8 len 7 prec 0; INDEX: name PRIMARY, id 0 44, fields 1/9, type 3 root page 207, appr.key vals 16305, leaf pages 53,
Re: How to find size of my database
Thank you VERY much, Mark! Your reply is EXCELLENT and gives us all a lot of very useful information. This is the kind of information that should be in the MySQL manual. Paul DuBois, if you're reading this, please consider adding all of Mark's information to the manual! I think this reply also points to a definite need within the MySQL community, namely monitoring tools. After all, any decent administrator is going to want to know the size of his databases at some point. I don't follow the development of tools for MySQL but if there are no tools to monitor database size, I would imagine there is a definite market for such tools. After all, why should each of us independently re-invent the wheel? This seems like an opportunity for an entrepreneurial type to make some money serving a market. Or for people who have already developed monitoring tools to contribute them freely to the MySQL community. Thanks again, Mark! I know I will revisit your reply when I get around to doing proper monitoring of my MySQL databases when they finally go into production. -- Rhino - Original Message - From: Mark Leith [EMAIL PROTECTED] To: Shivaji S [EMAIL PROTECTED] Cc: Rhino [EMAIL PROTECTED]; [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Wednesday, May 03, 2006 9:20 AM Subject: Re: How to find size of my database On Wed, 03 May 2006 Rhino wrote : Daniel de Veiga has already answered you on how to determine the size of your database by using the file system and simply looking at the size of the physical files in your database. Another possibility is that you could use the SHOW TABLE STATUS command in MySQL. If you go to your MySQL prompt and select a database, then use the SHOW TABLE STATUS command, like this: set tmp; show table status like '%'; you'll find a column called Data_length which tells you the length of the data file for each table. If you simply add the size of each table in the database together, you should have the size of the whole database. Please note that I'm not sure how accurate my suggestion is; you might find that Daniel's approach gives you a better answer. I'm not sure if the Data_length column considers all the overhead that you might have with a table, such as index sizes, pointer sizes, unusable space, etc. Perhaps someone else can jump in with a better approach; I'm inclined to think it can't be quite as easy as I suggested. I'll jump in for you.. Indeed, you are right that Data_length that does not cover space allocated but unused (i.e space freed up by DELETE or UPDATE statements that is not released back to the filesystem, before an OPTIMIZE TABLE for example). There are other columns within the output however - Data_free and Index_length. Therefore to get the total allocated space to a database: SUM(data_length) + SUM(index_length) Total of actual data: (SUM(data_length) - SUM(data_free)) + SUM(index_length) Allocated but unused: SUM(data_free) Also, even if the Data_length column gives an accurate answer for the size of a table, it is rather tedious to have to execute the SHOW TABLE STATUS command and then manually sum up the various sizes. I don't think you can simply execute an SQL query that does all the work for you, which is very unfortunate. Unfortunately within 4.0 there is no way to do this with a SQL query. You can do this on 5.0 however. For example: SELECT s.schema_name, CONCAT(IFNULL(ROUND((SUM(t.data_length)+SUM(t.index_length)) /1024/1024,2),0.00),Mb) total_size, CONCAT(IFNULL(ROUND(((SUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free))/1024/1024,2),0.00),Mb) data_used, CONCAT(IFNULL(ROUND(SUM(data_free)/1024/1024,2),0.00),Mb) data_free, IFNULL(ROUNDSUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free)) /((SUM(t.data_length)+SUM(t.index_length)))*100),2),0) pct_used, COUNT(table_name) total_tables FROM INFORMATION_SCHEMA.SCHEMATA s LEFT JOIN INFORMATION_SCHEMA.TABLES t ON s.schema_name = t.table_schema WHERE s.schema_name = sakila GROUP BY s.schema_name ORDER BY pct_used DESC\G *** 1. row *** schema_name: sakila total_size: 6.62Mb data_used: 6.62Mb data_free: 0.01Mb pct_used: 99.91 total_tables: 22 1 row in set (0.08 sec) It is entirely possible that there is a MySQL command that gives you the actual size of each database directly, although I didn't find it when I searched the manual. Again, perhaps someone with more administrative experience with MySQL can suggest a better approach. If not, perhaps we need to make a feature request of the MySQL people :-) This would appear to be a very useful command to create if it doesn't already exist! I have a little administrative experience ;) I'm going to confuse the matter now, as the above reports freespace correctly for storage engines such as MyISAM, however, it does not report the freespace properly within Data_free column for InnoDB tables - the freespace
How to find size of my database
Hi, is there any command to find the total size of mysql db. Regards, Shivaji.
How to find size of my database
Hi, is there any command to find the total size of mysql db. Regards, Shivaji.
Re: How to find size of my database
It would be easier to help if you specified what you meant by size. Do you mean the amount of space the database is using on your hard drive? Or the number of tables in the database? Or the number of rows in the tables? Or somethng else altogether? You should also mention which version of MySQL you are using; later versions have features and commands not found in earlier versions. Also, the size of a give database may differ from version to version of MySQL. -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 3:53 PM Subject: How to find size of my database Hi, is there any command to find the total size of mysql db. Regards, Shivaji. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Re: How to find size of my database
Hi Rhino, Thanks for the input. I mean to say the total Database Size ,that is to see my current Database Size.I am using 4.0.20 version Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : It would be easier to help if you specified what you meant by size. Do you mean the amount of space the database is using on your hard drive? Or the number of tables in the database? Or the number of rows in the tables? Or somethng else altogether? You should also mention which version of MySQL you are using; later versions have features and commands not found in earlier versions. Also, the size of a give database may differ from version to version of MySQL. -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 3:53 PM Subject: How to find size of my database Hi, is there any command to find the total size of mysql db. Regards, Shivaji. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006
Re: Re: How to find size of my database
You still haven't said what you mean by size! Let me put it to you this way: what units would be used in the answer you want? In other words, would the answer look like: 1. 234,000 KB? 2. 2.75 million rows? 3. 321 tables? Or something else altogether? -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 4:33 PM Subject: Re: Re: How to find size of my database Hi Rhino, Thanks for the input. I mean to say the total Database Size ,that is to see my current Database Size.I am using 4.0.20 version Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : It would be easier to help if you specified what you meant by size. Do you mean the amount of space the database is using on your hard drive? Or the number of tables in the database? Or the number of rows in the tables? Or somethng else altogether? You should also mention which version of MySQL you are using; later versions have features and commands not found in earlier versions. Also, the size of a give database may differ from version to version of MySQL. -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 3:53 PM Subject: How to find size of my database Hi, is there any command to find the total size of mysql db. Regards, Shivaji. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Re: Re: How to find size of my database
Hi Rhino, sorry ,for my unclear reply. the size i meant is in KB or MB.. Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : You still haven't said what you mean by size! Let me put it to you this way: what units would be used in the answer you want? In other words, would the answer look like: 1. 234,000 KB? 2. 2.75 million rows? 3. 321 tables? Or something else altogether? -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 4:33 PM Subject: Re: Re: How to find size of my database Hi Rhino, Thanks for the input. I mean to say the total Database Size ,that is to see my current Database Size.I am using 4.0.20 version Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : It would be easier to help if you specified what you meant by size. Do you mean the amount of space the database is using on your hard drive? Or the number of tables in the database? Or the number of rows in the tables? Or somethng else altogether? You should also mention which version of MySQL you are using; later versions have features and commands not found in earlier versions. Also, the size of a give database may differ from version to version of MySQL. -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 3:53 PM Subject: How to find size of my database Hi, is there any command to find the total size of mysql db. Regards, Shivaji. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006
Re: Re: How to find size of my database
On 2 May 2006 20:33:56 -, Shivaji S [EMAIL PROTECTED] wrote: Hi Rhino, Thanks for the input. I mean to say the total Database Size ,that is to see my current Database Size.I am using 4.0.20 version Hmm, as generic as your first post. I'll just assume a lot of things in order to try and answer your question. Lets see. 1) I'll assume you use myisam tables, as your version is kinda outdated. 2) I'll assume you want the total DISK space required for your database. (could be rows, could be tables, could be space used by the rows and tables, all of those are different, different storage engines use space differently, a innodb table could use 1GB in your disk, and 800MB on rows) 3) I'll assume that you KNOW how to get the size of a given file/directory on your Operating System. If I'm wrong in any assumption, please let me know. Locate your data directory, if you don't know where it is, or don't have access to it, you just can't do this (you can always take a look at the manual, windows is usually the data directory, linux is somewhere in /var/lib, YMMV). Into this directory, you'll see a new directory for every database, getting the size of the directory you see how much disk space the database has taken. -- Daniel da Veiga Computer Operator - RS - Brazil -BEGIN GEEK CODE BLOCK- Version: 3.1 GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V- PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++ --END GEEK CODE BLOCK-- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Re: Re: How to find size of my database
Daniel de Veiga has already answered you on how to determine the size of your database by using the file system and simply looking at the size of the physical files in your database. Another possibility is that you could use the SHOW TABLE STATUS command in MySQL. If you go to your MySQL prompt and select a database, then use the SHOW TABLE STATUS command, like this: set tmp; show table status like '%'; you'll find a column called Data_length which tells you the length of the data file for each table. If you simply add the size of each table in the database together, you should have the size of the whole database. Please note that I'm not sure how accurate my suggestion is; you might find that Daniel's approach gives you a better answer. I'm not sure if the Data_length column considers all the overhead that you might have with a table, such as index sizes, pointer sizes, unusable space, etc. Perhaps someone else can jump in with a better approach; I'm inclined to think it can't be quite as easy as I suggested. Also, even if the Data_length column gives an accurate answer for the size of a table, it is rather tedious to have to execute the SHOW TABLE STATUS command and then manually sum up the various sizes. I don't think you can simply execute an SQL query that does all the work for you, which is very unfortunate. It is entirely possible that there is a MySQL command that gives you the actual size of each database directly, although I didn't find it when I searched the manual. Again, perhaps someone with more administrative experience with MySQL can suggest a better approach. If not, perhaps we need to make a feature request of the MySQL people :-) This would appear to be a very useful command to create if it doesn't already exist! -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 5:12 PM Subject: Re: Re: Re: How to find size of my database Hi Rhino, sorry ,for my unclear reply. the size i meant is in KB or MB.. Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : You still haven't said what you mean by size! Let me put it to you this way: what units would be used in the answer you want? In other words, would the answer look like: 1. 234,000 KB? 2. 2.75 million rows? 3. 321 tables? Or something else altogether? -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 4:33 PM Subject: Re: Re: How to find size of my database Hi Rhino, Thanks for the input. I mean to say the total Database Size ,that is to see my current Database Size.I am using 4.0.20 version Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : It would be easier to help if you specified what you meant by size. Do you mean the amount of space the database is using on your hard drive? Or the number of tables in the database? Or the number of rows in the tables? Or somethng else altogether? You should also mention which version of MySQL you are using; later versions have features and commands not found in earlier versions. Also, the size of a give database may differ from version to version of MySQL. -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 3:53 PM Subject: How to find size of my database Hi, is there any command to find the total size of mysql db. Regards, Shivaji. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Re: Re: Re: How to find size of my database
Thanks Daniel,Rhino for the wounder full explanations given.I will work on finding the size of my databases with answers given by you. Regards, Shivaji. On Wed, 03 May 2006 Rhino wrote : Daniel de Veiga has already answered you on how to determine the size of your database by using the file system and simply looking at the size of the physical files in your database. Another possibility is that you could use the SHOW TABLE STATUS command in MySQL. If you go to your MySQL prompt and select a database, then use the SHOW TABLE STATUS command, like this: set tmp; show table status like '%'; you'll find a column called Data_length which tells you the length of the data file for each table. If you simply add the size of each table in the database together, you should have the size of the whole database. Please note that I'm not sure how accurate my suggestion is; you might find that Daniel's approach gives you a better answer. I'm not sure if the Data_length column considers all the overhead that you might have with a table, such as index sizes, pointer sizes, unusable space, etc. Perhaps someone else can jump in with a better approach; I'm inclined to think it can't be quite as easy as I suggested. Also, even if the Data_length column gives an accurate answer for the size of a table, it is rather tedious to have to execute the SHOW TABLE STATUS command and then manually sum up the various sizes. I don't think you can simply execute an SQL query that does all the work for you, which is very unfortunate. It is entirely possible that there is a MySQL command that gives you the actual size of each database directly, although I didn't find it when I searched the manual. Again, perhaps someone with more administrative experience with MySQL can suggest a better approach. If not, perhaps we need to make a feature request of the MySQL people :-) This would appear to be a very useful command to create if it doesn't already exist! -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 5:12 PM Subject: Re: Re: Re: How to find size of my database Hi Rhino, sorry ,for my unclear reply. the size i meant is in KB or MB.. Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : You still haven't said what you mean by size! Let me put it to you this way: what units would be used in the answer you want? In other words, would the answer look like: 1. 234,000 KB? 2. 2.75 million rows? 3. 321 tables? Or something else altogether? -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 4:33 PM Subject: Re: Re: How to find size of my database Hi Rhino, Thanks for the input. I mean to say the total Database Size ,that is to see my current Database Size.I am using 4.0.20 version Regards, Shivaji On Wed, 03 May 2006 Rhino wrote : It would be easier to help if you specified what you meant by size. Do you mean the amount of space the database is using on your hard drive? Or the number of tables in the database? Or the number of rows in the tables? Or somethng else altogether? You should also mention which version of MySQL you are using; later versions have features and commands not found in earlier versions. Also, the size of a give database may differ from version to version of MySQL. -- Rhino - Original Message - From: Shivaji S [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, May 02, 2006 3:53 PM Subject: How to find size of my database Hi, is there any command to find the total size of mysql db. Regards, Shivaji. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 01/05/2006
RE: Re: How to find size of my database
1) I'll assume you use myisam tables, as your version is kinda outdated. 2) I'll assume you want the total DISK space required for your database. (could be rows, could be tables, could be space used by the rows and tables, all of those are different, different storage engines use space differently, a innodb table could use 1GB in your disk, and 800MB on rows) 3) I'll assume that you KNOW how to get the size of a given file/directory on your Operating System. If I'm wrong in any assumption, please let me know. Locate your data directory, if you don't know where it is, or don't have access to it, you just can't do this (you can always take a look at the manual, windows is usually the data directory, linux is somewhere in /var/lib, YMMV). Into this directory, you'll see a new directory for every database, getting the size of the directory you see how much disk space the database has taken. -- Daniel da Veiga Computer Operator - RS - Brazil Hence on linux, if your database folder is /var/lib/mysql/mydb, then execute : du -sh /var/lib/mysql/mydb Regards, Rithish. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]