-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
A-kv-transactionsRelating to MVCC and the transactional model.Relating to MVCC and the transactional model.A-sql-table-statsTable statistics (and their automatic refresh).Table statistics (and their automatic refresh).A-storageRelating to our storage engine (Pebble) on-disk storage.Relating to our storage engine (Pebble) on-disk storage.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-storageStorage TeamStorage Team
Description
Pebble optimizes the retrieval of the latest MVCC version for each key. The table statistics scan results in reads that are not for the latest version, which is not ideal.
We should update the scan to not use a timestamp at all, and instead just retrieve the latest version of each key (it is ok to use even a non-committed version). This would be beneficial for the resulting statistics as well.
This will probably require some minor work in KV to allow this type of scan.
Jira issue: CRDB-57411
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-transactionsRelating to MVCC and the transactional model.Relating to MVCC and the transactional model.A-sql-table-statsTable statistics (and their automatic refresh).Table statistics (and their automatic refresh).A-storageRelating to our storage engine (Pebble) on-disk storage.Relating to our storage engine (Pebble) on-disk storage.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-storageStorage TeamStorage Team