0
我們使用SonarQube 5.6.6運行連接到mysql數據庫的碼頭容器。我們在數據庫清理器中配置了默認設置。但是,我們最近發現數據庫根本沒有得到清理。聲吶數據庫清理
我找不到與數據庫清理相關的任何日誌條目。所以我無法弄清楚發生了什麼問題。
這是我們當前的數據庫大小
MySQL [sonar]> SELECT table_schema "DB Name", Round(Sum(data_length + index_length)/1024/1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;
+--------------------+---------------+
| DB Name | DB Size in MB |
+--------------------+---------------+
| information_schema | 0.2 |
| sonar | 28842.6 |
+--------------------+---------------+
MySQL [sonar]> SELECT
-> table_name AS `Table`,
-> round(((data_length + index_length)/1024/1024), 2) `Size in MB`
-> FROM information_schema.TABLES
-> WHERE table_schema = 'sonar'
-> ;
+---------------------------+------------+
| Table | Size in MB |
+---------------------------+------------+
| active_dashboards | 0.05 |
| active_rule_parameters | 0.08 |
| active_rules | 0.34 |
| activities | 5.03 |
| authors | 0.03 |
| ce_activity | 2.06 |
| ce_queue | 0.05 |
| dashboards | 0.02 |
| duplications_index | 14.55 |
| events | 23.58 |
| file_sources | 11902.03 |
| group_roles | 0.20 |
| groups | 0.02 |
| groups_users | 0.06 |
| issue_changes | 24.53 |
| issue_filter_favourites | 0.03 |
| issue_filters | 0.03 |
| issues | 451.50 |
| loaded_templates | 0.02 |
| manual_measures | 0.03 |
| measure_filter_favourites | 0.03 |
| measure_filters | 0.03 |
| metrics | 0.08 |
| notifications | 0.02 |
| perm_templates_groups | 0.02 |
| perm_templates_users | 0.02 |
| permission_templates | 0.02 |
| project_links | 0.31 |
| project_measures | 11123.83 |
| project_qprofiles | 0.03 |
| projects | 1804.22 |
| properties | 0.03 |
| quality_gate_conditions | 0.02 |
| quality_gates | 0.03 |
| resource_index | 3049.98 |
| rules | 3.72 |
| rules_parameters | 0.17 |
| rules_profiles | 0.03 |
| schema_migrations | 0.02 |
| snapshots | 435.53 |
| user_roles | 0.05 |
| user_tokens | 0.05 |
| users | 0.11 |
| widget_properties | 0.03 |
| widgets | 0.05 |
+---------------------------+------------+
45 rows in set (0.00 sec)
我如何清理數據庫手動? 非常感謝您提供任何提示。
你期望被清理那不是。請比「完全不清理」更具體。 –
我預計數據庫的大小不會超過28千兆字節,代表幾百MB的代碼庫。這使我們難以調整我們的數據庫。具體來說,這些表格包含什麼? file_sources&project_measures。它們分別包含1.3和63百萬行。如果可能,我想手動清理。 –