martes, 9 de junio de 2020

Listar el tamaño d ela stablas de una base de datos

mysql> SELECT table_name AS "tabla", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Tamaño (MB)" FROM information_schema.TABLES WHERE table_schema = "ebdb" ORDER BY (data_length + index_length) DESC;
+--------------------------+--------------+
| tabla                    | Tamaño (MB)  |
+--------------------------+--------------+
| wp_postmeta              |      2172.67 |
| wp_options               |       990.19 |
| wp_posts                 |       573.66 |
| wp_cf_form_entry_values  |       124.20 |
| wp_redirection_404       |        48.69 |
| wp_cf_form_entries       |        18.58 |
| wp_ine_activity_log      |        13.52 |
| wp_redirection_logs      |         3.33 |
| wp_usermeta              |         0.55 |
| wp_term_relationships    |         0.22 |
| wp_redirection_items     |         0.09 |
| wp_terms                 |         0.09 |
| wp_term_taxonomy         |         0.09 |
| wp_comments              |         0.09 |
| wp_users                 |         0.06 |
| wp_cf_tracking_meta      |         0.05 |
| wp_redirection_groups    |         0.05 |
| wp_cf_form_entry_meta    |         0.05 |
| wp_termmeta              |         0.05 |
| wp_commentmeta           |         0.05 |
| wp_download_log          |         0.03 |
| wp_dlm_order_transaction |         0.03 |
| wp_dlm_order_item        |         0.03 |
| wp_links                 |         0.03 |
| wp_dlm_order_customer    |         0.03 |
| wp_cf_tracking           |         0.02 |
| wp_ine_activity_conf_log |         0.02 |
| wp_dlm_session           |         0.02 |
| wp_dlm_order             |         0.02 |
| wp_responsive_menu       |         0.02 |
+--------------------------+--------------+
30 rows in set (0.00 sec)

No hay comentarios:

Publicar un comentario