diff --git a/frontend/src/lib/terms.ts b/frontend/src/lib/terms.ts index da104668..6e4a5e4d 100644 --- a/frontend/src/lib/terms.ts +++ b/frontend/src/lib/terms.ts @@ -2988,8 +2988,9 @@ export const PROFILE_TEXT = { rowsCount: (n: number) => `${formatNumber(n)} 行`, rowsAtLeast: (n: number) => `超过 ${formatNumber(n - 1)} 行`, rowsUnknown: '没能得到行数', - rowsHint: { stats: '数据库统计信息中的估算值', count: '计数到整表统计行数上限为止' } as Record, - rowsSource: { stats: '来自数据库统计信息', count: '数到整表统计行数上限为止' } as Record, + // count 是逐行数完了(没超过整表统计行数上限,是准数);capped 是数到上限还没数完,只知道至少多少行 + rowsHint: { stats: '数据库统计信息中的估算值', count: '逐行数出来的准数,没超过整表统计行数上限', capped: '计数到整表统计行数上限为止' } as Record, + rowsSource: { stats: '来自数据库统计信息', count: '逐行数出来的', capped: '数到整表统计行数上限为止' } as Record, openTable: '打开', openTableLabel: (name: string) => `打开「${name}」`, findingRelations: '关联关系', diff --git a/frontend/src/pages/catalog/profile.ts b/frontend/src/pages/catalog/profile.ts index 2168fb5d..a6d41fb2 100644 --- a/frontend/src/pages/catalog/profile.ts +++ b/frontend/src/pages/catalog/profile.ts @@ -219,7 +219,7 @@ export function agoText(v: string | null | undefined, now = Date.now()): string return days <= 30 ? `${days} 天前` : formatTime(d) } -/** 行数估算写成人话,带来源(统计信息 / 数到上限);没有估算为 null */ +/** 行数估算写成人话,带来源(统计信息 / 逐行数出来的 / 数到上限);没有估算为 null */ export function sizeText(size: CatalogProfileSize | null | undefined): { text: string; hint?: string; source?: string } | null { if (!size) return null if (size.rows != null) { @@ -227,7 +227,7 @@ export function sizeText(size: CatalogProfileSize | null | undefined): { text: s hint: PROFILE_TEXT.rowsHint[size.method], source: PROFILE_TEXT.rowsSource[size.method] } } if (size.at_least != null) { - return { text: PROFILE_TEXT.rowsAtLeast(size.at_least), hint: PROFILE_TEXT.rowsHint.count, source: PROFILE_TEXT.rowsSource.count } + return { text: PROFILE_TEXT.rowsAtLeast(size.at_least), hint: PROFILE_TEXT.rowsHint.capped, source: PROFILE_TEXT.rowsSource.capped } } return { text: PROFILE_TEXT.rowsUnknown } }