Size: separate data_length and index_length

オープン
#348 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wp-cli/db-command のほかの issue

wp-cli/db-command の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。