Repository navigation
Commit 88d2b18
db size: Allow displaying data and index size separately
The reported size has always been the sum of the data and the index
size, which hides how much of a database is taken up by indexes alone.
Add optional `Data` and `Index` fields that can be selected through the
new `--fields` argument, while `Size` keeps reporting the total.
For SQLite, the size of a table now covers its indexes as well, which
matches how table sizes are reported for MySQL and MariaDB.
Human readable sizes now default to two decimals, so that a database of
6.23 GB is no longer reported as 7 GB, and a value that rounds up into
the next size format is displayed in that size format.
Fixes #348
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WA7GLFtiJMyt4ZwaDq194v1 parent 19e4a9e commit 88d2b18
4 files changed
Lines changed: 278 additions & 116 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
| 829 | + | |
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
835 | 840 | | |
836 | 841 | | |
837 | 842 | | |
| |||
876 | 881 | | |
877 | 882 | | |
878 | 883 | | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
879 | 887 | | |
880 | 888 | | |
881 | 889 | | |
| |||
893 | 901 | | |
894 | 902 | | |
895 | 903 | | |
896 | | - | |
| 904 | + | |
897 | 905 | | |
898 | 906 | | |
899 | 907 | | |
| |||
919 | 927 | | |
920 | 928 | | |
921 | 929 | | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
922 | 942 | | |
923 | 943 | | |
924 | 944 | | |
| |||
946 | 966 | | |
947 | 967 | | |
948 | 968 | | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
949 | 976 | | |
950 | 977 | | |
951 | 978 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
115 | 150 | | |
116 | 151 | | |
117 | 152 | | |
| |||
191 | 226 | | |
192 | 227 | | |
193 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
194 | 240 | | |
195 | 241 | | |
196 | 242 | | |
| |||
0 commit comments