diff --git a/src/storage/access/ob_multiple_merge.h b/src/storage/access/ob_multiple_merge.h index 9746dfbc43..0b8d54ff9b 100644 --- a/src/storage/access/ob_multiple_merge.h +++ b/src/storage/access/ob_multiple_merge.h @@ -200,7 +200,7 @@ OB_INLINE int ObMultipleMerge::update_and_report_tablet_stat() if (MTL(compaction::ObTenantTabletScheduler *)->enable_adaptive_compaction()) { report_tablet_stat(); } - access_ctx_->table_store_stat_.reset(); + access_ctx_->table_store_stat_.reuse(); return ret; } diff --git a/src/storage/access/ob_table_access_context.h b/src/storage/access/ob_table_access_context.h index 486cb842e8..987145afb3 100644 --- a/src/storage/access/ob_table_access_context.h +++ b/src/storage/access/ob_table_access_context.h @@ -67,6 +67,18 @@ struct ObTableScanStoreStat { MEMSET(this, 0, sizeof(ObTableScanStoreStat)); } + // for rescan query, keep row cache and bf releated stats unchanged + OB_INLINE void reuse() + { + block_cache_hit_cnt_ = 0; + block_cache_miss_cnt_ = 0; + micro_access_cnt_ = 0; + pushdown_micro_access_cnt_ = 0; + empty_read_cnt_ = 0; + rowkey_prefix_ = 0; + logical_read_cnt_ = 0; + physical_read_cnt_ = 0; + } public: OB_INLINE bool enable_get_row_cache() const {