|
@@ -112,8 +112,6 @@ def probe_table(conn, schema, table, full_rows):
|
|
|
- PK:单/复合/无 + 是否自增(attidentity + default 表达式 nextval 双判)
|
|
- PK:单/复合/无 + 是否自增(attidentity + default 表达式 nextval 双判)
|
|
|
- create_time 主键序范围:单列自增 PK + create_time 存在;ORDER BY pk ASC/DESC LIMIT 1
|
|
- create_time 主键序范围:单列自增 PK + create_time 存在;ORDER BY pk ASC/DESC LIMIT 1
|
|
|
- update_time 抽样:TABLESAMPLE SYSTEM(1) LIMIT 1000,非空数 > 0 即视为业务方已启用
|
|
- update_time 抽样:TABLESAMPLE SYSTEM(1) LIMIT 1000,非空数 > 0 即视为业务方已启用
|
|
|
- (不取最早非空时间——全表 min 在大表上慢;启用日期对决策意义不大,
|
|
|
|
|
- 只关心"是否启用"二元值)
|
|
|
|
|
- 软删:full_rows 筛 'del' 子串(不区分大小写)
|
|
- 软删:full_rows 筛 'del' 子串(不区分大小写)
|
|
|
"""
|
|
"""
|
|
|
cur = conn.cursor()
|
|
cur = conn.cursor()
|