diff --git a/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照存 CellData_4G - CellData_5G,默认全部保留只手动删除.md b/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照存 CellData_4G - CellData_5G,默认全部保留只手动删除.md new file mode 100644 index 0000000..7530f6e --- /dev/null +++ b/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照存 CellData_4G - CellData_5G,默认全部保留只手动删除.md @@ -0,0 +1,35 @@ +--- +title: 工参快照存 CellData_4G / CellData_5G,默认全部保留只手动删除 +type: decision +permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照存-cell-data-4-g-cell-data-5-g-默认全部保留只手动删除 +stable_id: 2d64b1a5-fafb-4c8f-bce3-de11357433ab +scope: project +memory_type: decision +project_id: d5a7f581-c442-4554-87b9-ee723b8b0258 +usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 +status: active +revision: 2 +request_id: gongcan-retention-20261111-2 +created_at: '2026-11-10T18:10:55.354078+00:00' +updated_at: '2026-11-10T18:31:57.942911+00:00' +tags: +- DecomEval +- 工参 +- 快照 +- 保留 +- CellData +--- + +## 决定(2026-11-11 用户确定) +- 4G、5G 小区分表:"CellData_4G"、"CellData_5G"(用户指定表名,与已有 "CellData" 同样是区分大小写的表名,手写 SQL 要加双引号)。原因:以后两边表结构可能不同。 +- 快照索引表仍是 gongcan_snapshot(city+snapshot_date 唯一,status 兼作取数锁)。 +- 快照默认全部保留,系统不自动清理;手动删 gongcan_snapshot 的行,两张 CellData 表按外键 ON DELETE CASCADE 级联删除;不要删 status='loading' 的行。 + +## 列(沿用平台工参表列名) +- CellData_4G:cgi、cell_name、station_name、latitude、longitude、enodeb_id、enodeb_name + network_type、area、town、state、cover_type、frequency_band、vendor、azimuth。 +- CellData_5G:ncgi、nrcell_name、station_name、latitude、longitude、gnodeb_id、gnodeb_name + 同样的公共列。 +- 索引:唯一 (snapshot_id, cgi/ncgi),普通 (snapshot_id, station_name);索引名 uq_celldata_4g_cgi、ix_celldata_4g_station、uq_celldata_5g_ncgi、ix_celldata_5g_station。 +- 程序里 GongcanStore.cells() 合成统一字段(tech、cgi、cell_name、site_name、node_id、node_name…)给邻站计算。 + +## 生产现状(迁移 0008_celldata_split,镜像 decomeval:33d132d) +江门 2026-10-01(4G 38312 / 5G 23751)、2026-11-10(37604 / 23801)两份快照已从 gongcan_cell 搬过来并核对行数一致,gongcan_cell 已删。CellData_4G 30 MB、CellData_5G 19 MB。 \ No newline at end of file diff --git a/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照默认全部保留,只手动删除.md b/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照默认全部保留,只手动删除.md deleted file mode 100644 index 5c710b8..0000000 --- a/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照默认全部保留,只手动删除.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: 工参快照默认全部保留,只手动删除 -type: decision -permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/工参快照默认全部保留只手动删除 -stable_id: 2d64b1a5-fafb-4c8f-bce3-de11357433ab -scope: project -memory_type: decision -project_id: d5a7f581-c442-4554-87b9-ee723b8b0258 -usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 -status: active -revision: 1 -request_id: gongcan-retention-20261111-1 -created_at: '2026-11-10T18:10:55.354078+00:00' -updated_at: '2026-11-10T18:10:55.354078+00:00' -tags: -- DecomEval -- 工参 -- 快照 -- 保留 ---- - -## 决定(2026-11-11 用户确定) -gongcan_snapshot / gongcan_cell 里的工参快照默认全部保留,系统不做自动清理。需要删除时由人手动删。 - -## 做法 -- 手动删 gongcan_snapshot 的行,gongcan_cell 按外键 ON DELETE CASCADE 级联删除。 -- 不要删 status = 'loading' 的行(正在取数)。 - -## 结构与占用(生产实查) -- 4G、5G 合在一张 gongcan_cell,用 tech 区分。 -- 索引:gongcan_snapshot 唯一 (city, snapshot_date);gongcan_cell 唯一 (snapshot_id, cgi, tech)、普通 (snapshot_id, site_name)。按 CGI、按站点查目标是否在某天快照里都是 Index Only Scan。 -- 江门两份快照约 12.3 万小区占 52 MB(索引 13 MB),每份约 26 MB。 \ No newline at end of file