Skip to main content

collect_table_statistics

Function collect_table_statistics 

Source
async fn collect_table_statistics<Q>(
    conn: &mut Q,
    table: &MySqlTableName,
    exact_count_max_rows: u64,
) -> Result<TableStatistics, TransientError>
where Q: Queryable,
Expand description

Row count for the snapshot size gauge. Tables whose optimizer row estimate exceeds exact_count_max_rows report the estimate directly, everything else is counted exactly with COUNT(*). The gauge only drives progress reporting, and an estimate is a fair trade for skipping an O(rows) index walk on a large table.