Size: separate data_length and index_length

未关闭
#348 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
mariadb, mysql, php
领域
cli, database

调研方向

Start at the database size reporting path used by the --human-readable output and inspect how data and index sizes are currently combined and rounded. Done means the output separates Data, Index, and Total while preserving the combined total and avoiding the demonstrated rounding discrepancy.

由索引模型根据 Issue 内容生成。

描述

command:db-size scope:documentation

Feature Request

Especially on larger sites, and with DB optimization (i.e. additional indexes), indexes can be quite big already on its own. Calculating data and index sizes together skew things slightly.

Here's an example of one site

Data total: ~3.43 GB
Index total: ~2.80 GB
Grand total: ~6.23 GB

Describe the solution you'd like

At least when using an output format that doesn't just give the size as a number, data and index should be displayed separately. At least it should be clearly documented that index sizes are counted to tally.

For example with --human-readable instead of

+------+------+
| Name | Size |
+------+------+
| wdb  | 7 GB |
+------+------+

return could be

| Name | Data    | Index   | Total   |
|------|---------|---------|---------|
| wdb  | 3.43 GB | 2.80 GB | 6.23 GB |

There's currently also slight rounding issue where 6.23 GB becomes 7 GB.

主要语言
PHP
星标
76
派生
73
平均合并
9 小时 31 分钟
30 天内合并 PR
2

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

wp-cli/db-command 的其他 Issue

查看 wp-cli/db-command 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。