Re: Q: How to determine size(s) of db files?
Hello. On Wed 2002-09-11 at 12:48:02 -0400, [EMAIL PROTECTED] wrote: Is there a MySQL command that will return the amount of disk space used by a particular database? I find lots of references to size limits on tables / databases etc. but nothing on the actual 'disk usage'. You can use SHOW TABLE STATUS [FROM yourdatabase] [LIKE pattern] in order to see a overview of the tables including their resp. data and index file sizes. This would be nice to have I think, since without access to the data directory on the server, I have to ask my ISP to do a 'du' for me. I maintain several databases for clients with my ISP, and since I'm paying for disk space, I'd like to be able to pass that cost on to my clients. Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Q: How to determine size(s) of db files?
Benjamin Pflugmann wrote: Hello. On Wed 2002-09-11 at 12:48:02 -0400, [EMAIL PROTECTED] wrote: Is there a MySQL command that will return the amount of disk space used by a particular database? I find lots of references to size limits on tables / databases etc. but nothing on the actual 'disk usage'. You can use SHOW TABLE STATUS [FROM yourdatabase] [LIKE pattern] in order to see a overview of the tables including their resp. data and index file sizes. This would be nice to have I think, since without access to the data directory on the server, I have to ask my ISP to do a 'du' for me. I maintain several databases for clients with my ISP, and since I'm paying for disk space, I'd like to be able to pass that cost on to my clients. Bye, Benjamin. -- [EMAIL PROTECTED] That seems to do it. But I'm not sure what to use for a pattern. My first attempt I used the table name with a \G and got back some data. I'm guessing 'Data_length' is the size of the table? That's about right, since after installing phpMyAdmin, it gives me about the same number. Thanks! -- /* All outgoing email scanned by Norton Antivirus 2002 */ Amer Neely, Softouch Information Services W: www.softouch.on.ca E: [EMAIL PROTECTED] V: 519.438.5887 Perl | PHP | MySQL | CGI programming for all data entry forms. We make web sites work! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Q: How to determine size(s) of db files?
Hello. On Fri 2002-09-13 at 02:42:16 -0400, [EMAIL PROTECTED] wrote: Benjamin Pflugmann wrote: [...] SHOW TABLE STATUS [FROM yourdatabase] [LIKE pattern] in order to see a overview of the tables including their resp. data and index file sizes. [...] That seems to do it. But I'm not sure what to use for a pattern. Did you have a look at the appropriate manual section? You can specify patterns as you would in for a LIKE in a WHERE clause, i.e. _ means any char and % means any number of any chars. It restricts the tables you want to inspect. E.g. if you only want to see the tables user_old and user_new, the following might to the trick: SHOW TABLE STATUS LIKE user\_% (\_ escapes the _ to mean a real _ and not any char in this case.) My first attempt I used the table name with a \G and got back some data. I'm guessing 'Data_length' is the size of the table? That's about right, since after installing phpMyAdmin, it gives me about the same number. The manual is your friend: http://www.mysql.com/doc/en/SHOW_TABLE_STATUS.html which says that Data_length is the length of the data file, i.e. size of the the .MYD file which is what you probably mean with size of the table. Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Q: How to determine size(s) of db files? - Resolved
Eric Lamendola wrote: If you are using PHP, Then download phpMyAdmin from the website of the same name. It is the best PHP/Web based utility for connecting to a MySQL database. At 12:48 PM 9/11/02 -0400, Amer Neely wrote: Is there a MySQL command that will return the amount of disk space used by a particular database? I find lots of references to size limits on tables / databases etc. but nothing on the actual 'disk usage'. This would be nice to have I think, since without access to the data directory on the server, I have to ask my ISP to do a 'du' for me. I maintain several databases for clients with my ISP, and since I'm paying for disk space, I'd like to be able to pass that cost on to my clients. -- /* All outgoing email scanned by Norton Antivirus 2002 */ Amer Neely, Softouch Information Services W: www.softouch.on.ca E: [EMAIL PROTECTED] V: 519.438.5887 Perl | PHP | MySQL | CGI programming for all data entry forms. We make web sites work! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php Eric, thanks for the tip. I grabbed it and configured it in about 2 minutes and can now access all my little friends. Oh, yes, and the file sizes are listed too :) -- /* All outgoing email scanned by Norton Antivirus 2002 */ Amer Neely, Softouch Information Services W: www.softouch.on.ca E: [EMAIL PROTECTED] V: 519.438.5887 Perl | PHP | MySQL | CGI programming for all data entry forms. We make web sites work! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php