Skip to content

wp db size --all-tables --size_format=mb produces unexpected results  #129

@danielbachhuber

Description

@danielbachhuber

Current behavior on v2.1.0:

$ wp db size --all-tables --size_format=mb
924

Expected behavior would be something similar to this:

$ wp db size --scope=all --tables --size_format=mb
+-----------------------+--------+
| Name                  | Size   |
+-----------------------+--------+
| wp_commentmeta        | 56 MB  |
| wp_comments           | 72 MB  |
| wp_links              | 1 MB   |
| wp_options            | 8 MB   |
| wp_postmeta           | 76 MB  |
| wp_posts              | 300 MB |
| wp_term_relationships | 3 MB   |
| wp_term_taxonomy      | 4 MB   |
| wp_termmeta           | 1 MB   |
| wp_terms              | 5 MB   |
| wp_usermeta           | 1 MB   |
| wp_users              | 1 MB   |
| wp_yoast_seo_links    | 4 MB   |
| wp_yoast_seo_meta     | 1 MB   |
+-----------------------+--------+

Here's a truncated list of all of my tables:

$ wp db tables --all-tables
_mig_wpmdb_alter_statements
wp_ai_statistics
wp_commentmeta
wp_comments
wp_facetwp_index
wp_links
wp_nf3_action_meta
wp_nf3_actions
wp_nf3_chunks
[...]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions