pingcap / pingcap/tidb

Tracking issue: sample-based NDV for large ANALYZE jobs

Open
#67,449 0 comments 1 reaction 1 assignee Claimed by @0xPoe View on GitHub
component/statistics sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Summary
Track the implementation of sample-based NDV collection for large-table `ANALYZE`.
## Goal
Reduce TiKV-side NDV collection cost for very large analyze jobs while keeping NDV accuracy acceptable.

## Scope
- implement sample-based NDV collection for Analyze V2
- define how it is enabled (explicit knob and/or auto-trigger for very large / slow analyze jobs)
- benchmark both NDV accuracy and resource usage on representative datasets
- document behavior and limitations clearly

## Out of scope
The first step does not promise full-scan / IOPS reduction. The initial implementation mainly targets TiKV CPU cost.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.