How to know Data Size through Scripts
Dear all, I am research on several commands through which I can monitor the size of specific data of tables in different . I want to write a script that fetches the data of different database tables databases too daily and write it into a file . Is there is any way or commands to achieve this. I researched a lot , I find commands as : SELECT CONCAT(sum(ROUND(((DATA_LENGTH + INDEX_LENGTH - DATA_FREE) / 1024 / 1024),2)), MB) AS Size FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA like 'abc' ; Is there is any simple commands to know this. Thanks best Regards, Adarsh Sharma -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Table Records Deleted by anonymous user!
Hello! Johan De Meersman wrote: From: Vikram A vikkiatb...@yahoo.in Thank you for info. Now we enabled the logs. The DB administrator itself made a mistake that he restored the back up This may be obvious, but keep your logs on separate disks if you can - full query logs take quite a bit of I/O away, so if you have them on the same disks as your data they may have a significant impact on performance. While the above is true, I see a far more relevant reason to keep logs and data on separate disks: If you ever want to use your logs for recovery after a (physical) disk problem, it is essential that they were not also damaged by the issue. Keeping them on a separate disk drive (drive, not just partition) will give you that independence. Granted, a severe damage to controller or machine (overvoltage, fire, theft, ...) may still cause the simultaneous loss of both data and logs, but these should be less likely that the ordinary disk breakage. Against the other risks, protect yourself by taking scheduled backups to removable media which you store externally, like in a bank safe. Then, you cannot lose all your data, but only those which were changed since the last backup, so it becomes a matter of backup frequency. And remember: a RAID is no replacement for backup. Regards, Joerg -- Joerg Bruehe, MySQL Build Team, joerg.bru...@oracle.com ORACLE Deutschland B.V. Co. KG, Komturstrasse 18a, D-12099 Berlin Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven Amtsgericht Muenchen: HRA 95603 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
IF
Does the _function_ 'IF' always evaluate its arguments? or only the two that it is needful to evaluate? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: IF
- Original Message - From: Sándor Halász h...@tbbs.net Does the _function_ 'IF' always evaluate its arguments? or only the two that it is needful to evaluate? I'm afraid I'm not authoritative on this, but it seems to me that it would be very very bad if the third, unused expression were to be evaluated - not only from a performance point of view, but who is to say that that expression is not a user-defined function that modifies the database ? -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een ezel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Benetl a free ETL tool using MySQL is out in version 3.7
Dear all, Benetl, a free ETL tool for files using MySQL, is out in version 3.7. You can freely download it at: www.benetl.net This version brings new controls and messages in the GUI. This version brings improvements and a bug correction in GUI. You should update. You can learn more about ETL tools at: http://en.wikipedia.org/wiki/Extract,_transform,_load Thanks for your interest. Regards, -- Benoît Carpentier http://www.benetl.net Founder of Benetl and Java project manager -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Unexpected Select Output
Dear all, Today I shoot a query to know the size of tables in a particular database, but don't know why it prints only the output of only one table. Here is my query output : mysql SELECT table_schema 'database',table_name 'Table', concat( round( sum( data_length + index_length ) / ( 1024*1024*1024) , 2 ) , 'G' ) sizeGB,concat( round( sum( data_length + index_length ) / ( 1024*1024) , 2 ) , 'M' ) sizeMB,concat( round( sum( data_length + index_length ) / ( 1024) , 2 ) , 'K' ) sizeKB FROM information_schema.TABLES WHERE table_name ='hc_categories' or table_name='hc_master' or table_name='hc_web' and table_schema='pdc_crawler'; - ; +-+---++++ | database| Table | sizeGB | sizeMB | sizeKB | +-+---++++ | pdc_crawler | hc_categories | 0.00G | 0.06M | 58.71K | +-+---++++ Why it is not able to print all table that fits in OR condition. Thanks best Regards, Adarsh Sharma -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org