for rescan query, keep row cache releated stats unchanged

This commit is contained in:
haitaoyang
2024-06-18 05:02:07 +00:00
committed by ob-robot
parent 2af11711bb
commit f14c8b3d34
2 changed files with 13 additions and 1 deletions

View File

@ -200,7 +200,7 @@ OB_INLINE int ObMultipleMerge::update_and_report_tablet_stat()
if (MTL(compaction::ObTenantTabletScheduler *)->enable_adaptive_compaction()) { if (MTL(compaction::ObTenantTabletScheduler *)->enable_adaptive_compaction()) {
report_tablet_stat(); report_tablet_stat();
} }
access_ctx_->table_store_stat_.reset(); access_ctx_->table_store_stat_.reuse();
return ret; return ret;
} }

View File

@ -67,6 +67,18 @@ struct ObTableScanStoreStat
{ {
MEMSET(this, 0, sizeof(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: public:
OB_INLINE bool enable_get_row_cache() const OB_INLINE bool enable_get_row_cache() const
{ {