Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions be/src/exec/operator/olap_scan_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,42 @@ Status OlapScanLocalState::_init_profile() {
ADD_TIMER_WITH_LEVEL(_segment_profile, "InvertedIndexAnalyzerTime", 1);
_inverted_index_lookup_timer =
ADD_TIMER_WITH_LEVEL(_segment_profile, "InvertedIndexLookupTimer", 1);
_seq_map_candidate_driver_groups_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateDriverGroups", TUnit::UNIT);
_seq_map_candidate_driver_predicates_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateDriverPredicates", TUnit::UNIT);
_seq_map_candidate_rows_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateRows", TUnit::UNIT);
_seq_map_candidate_scan_rows_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateScanRows", TUnit::UNIT);
_seq_map_candidate_scan_bytes_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateScanBytes", TUnit::BYTES);
_seq_map_candidate_full_scan_rows_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateFullScanRows", TUnit::UNIT);
_seq_map_candidate_index_filtered_rows_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateIndexFilteredRows", TUnit::UNIT);
_seq_map_candidate_bloom_filter_filtered_rows_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateBloomFilterFilteredRows", TUnit::UNIT);
_seq_map_candidate_index_downgrades_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateIndexDowngrades", TUnit::UNIT);
_seq_map_candidate_index_lookup_timer =
ADD_TIMER(_segment_profile, "SeqMapCandidateIndexLookupTime");
_seq_map_candidate_cache_local_bytes_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateCacheLocalBytes", TUnit::BYTES);
_seq_map_candidate_cache_remote_bytes_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateCacheRemoteBytes", TUnit::BYTES);
_seq_map_candidate_keys_before_intersect_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateKeysBeforeIntersect", TUnit::UNIT);
_seq_map_candidate_keys_after_intersect_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateKeysAfterIntersect", TUnit::UNIT);
_seq_map_candidate_key_bytes_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateKeyBytes", TUnit::BYTES);
_seq_map_candidate_build_timer = ADD_TIMER(_segment_profile, "SeqMapCandidateBuildTime");
_seq_map_point_range_build_timer = ADD_TIMER(_segment_profile, "SeqMapPointRangeBuildTime");
_seq_map_candidate_fallbacks_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidateFallbacks", TUnit::UNIT);
_seq_map_candidate_pruned_tablets_counter =
ADD_COUNTER(_segment_profile, "SeqMapCandidatePrunedTablets", TUnit::UNIT);

_output_index_result_column_timer = ADD_TIMER(_segment_profile, "OutputIndexResultColumnTime");
_filtered_segment_counter = ADD_COUNTER(_segment_profile, "NumSegmentFiltered", TUnit::UNIT);
Expand Down Expand Up @@ -1247,6 +1283,10 @@ Status OlapScanLocalState::_build_key_ranges_and_filters() {
}
DCHECK(_slot_id_to_predicates.count(iter->first) > 0);
const auto& value_range = iter->second;
if (std::visit([](const auto& range) { return range.is_whole_value_range(); },
value_range)) {
break;
}

std::optional<int> key_to_erase;
bool is_fixed_value_range = false;
Expand Down
19 changes: 19 additions & 0 deletions be/src/exec/operator/olap_scan_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,25 @@ class OlapScanLocalState final : public ScanLocalState<OlapScanLocalState> {
RuntimeProfile::Counter* _inverted_index_downgrade_count_counter = nullptr;
RuntimeProfile::Counter* _inverted_index_analyzer_timer = nullptr;
RuntimeProfile::Counter* _inverted_index_lookup_timer = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_driver_groups_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_driver_predicates_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_rows_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_scan_rows_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_scan_bytes_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_full_scan_rows_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_index_filtered_rows_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_bloom_filter_filtered_rows_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_index_downgrades_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_index_lookup_timer = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_cache_local_bytes_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_cache_remote_bytes_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_keys_before_intersect_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_keys_after_intersect_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_key_bytes_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_build_timer = nullptr;
RuntimeProfile::Counter* _seq_map_point_range_build_timer = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_fallbacks_counter = nullptr;
RuntimeProfile::Counter* _seq_map_candidate_pruned_tablets_counter = nullptr;

RuntimeProfile::Counter* _ann_topn_filter_counter = nullptr;
// topn_search_costs = index_load_costs + engine_search_costs + pre_process_costs + post_process_costs
Expand Down
Loading