This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a877857ae [improvement](inverted index)Remove searcher bitmap timer 
to improve query speed (#17407)
3a877857ae is described below

commit 3a877857aeab8fb70490f6d3cc1b78ab959d5a56
Author: qiye <[email protected]>
AuthorDate: Wed Mar 8 14:03:36 2023 +0800

    [improvement](inverted index)Remove searcher bitmap timer to improve query 
speed (#17407)
    
    Timer becomes a bottleneck when the query hit volume is very high.
---
 be/src/olap/olap_common.h                               | 1 -
 be/src/olap/rowset/segment_v2/inverted_index_reader.cpp | 8 +++-----
 be/src/vec/exec/scan/new_olap_scan_node.cpp             | 2 --
 be/src/vec/exec/scan/new_olap_scan_node.h               | 1 -
 be/src/vec/exec/scan/new_olap_scanner.cpp               | 2 --
 5 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/be/src/olap/olap_common.h b/be/src/olap/olap_common.h
index 60b48c83f9..2ae791969b 100644
--- a/be/src/olap/olap_common.h
+++ b/be/src/olap/olap_common.h
@@ -353,7 +353,6 @@ struct OlapReaderStatistics {
     int64_t inverted_index_query_bitmap_op_timer = 0;
     int64_t inverted_index_searcher_open_timer = 0;
     int64_t inverted_index_searcher_search_timer = 0;
-    int64_t inverted_index_searcher_bitmap_timer = 0;
 
     int64_t output_index_result_column_timer = 0;
     // number of segment filtered by column stat when creating seg iterator
diff --git a/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp 
b/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp
index b330754803..ae2991a969 100644
--- a/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp
+++ b/be/src/olap/rowset/segment_v2/inverted_index_reader.cpp
@@ -165,9 +165,8 @@ Status FullTextIndexReader::query(OlapReaderStatistics* 
stats, const std::string
                 try {
                     
SCOPED_RAW_TIMER(&stats->inverted_index_searcher_search_timer);
                     index_searcher->_search(
-                            query.get(), [&term_match_bitmap, stats](const 
int32_t docid,
-                                                                     const 
float_t /*score*/) {
-                                
SCOPED_RAW_TIMER(&stats->inverted_index_searcher_bitmap_timer);
+                            query.get(),
+                            [&term_match_bitmap](const int32_t docid, const 
float_t /*score*/) {
                                 // docid equal to rowid in segment
                                 term_match_bitmap->add(docid);
                             });
@@ -316,9 +315,8 @@ Status 
StringTypeInvertedIndexReader::query(OlapReaderStatistics* stats,
     try {
         SCOPED_RAW_TIMER(&stats->inverted_index_searcher_search_timer);
         index_searcher->_search(query.get(),
-                                [&result, stats](const int32_t docid, const 
float_t /*score*/) {
+                                [&result](const int32_t docid, const float_t 
/*score*/) {
                                     // docid equal to rowid in segment
-                                    
SCOPED_RAW_TIMER(&stats->inverted_index_searcher_bitmap_timer);
                                     result.add(docid);
                                 });
     } catch (const CLuceneError& e) {
diff --git a/be/src/vec/exec/scan/new_olap_scan_node.cpp 
b/be/src/vec/exec/scan/new_olap_scan_node.cpp
index d32224ee11..0ea05409cb 100644
--- a/be/src/vec/exec/scan/new_olap_scan_node.cpp
+++ b/be/src/vec/exec/scan/new_olap_scan_node.cpp
@@ -124,8 +124,6 @@ Status NewOlapScanNode::_init_profile() {
             ADD_TIMER(_segment_profile, "InvertedIndexSearcherOpenTime");
     _inverted_index_searcher_search_timer =
             ADD_TIMER(_segment_profile, "InvertedIndexSearcherSearchTime");
-    _inverted_index_searcher_bitmap_timer =
-            ADD_TIMER(_segment_profile, "InvertedIndexSearcherGenBitmapTime");
 
     _output_index_result_column_timer = ADD_TIMER(_segment_profile, 
"OutputIndexResultColumnTimer");
 
diff --git a/be/src/vec/exec/scan/new_olap_scan_node.h 
b/be/src/vec/exec/scan/new_olap_scan_node.h
index 29d4220a17..3043fe60f7 100644
--- a/be/src/vec/exec/scan/new_olap_scan_node.h
+++ b/be/src/vec/exec/scan/new_olap_scan_node.h
@@ -138,7 +138,6 @@ private:
     RuntimeProfile::Counter* _inverted_index_query_bitmap_op_timer = nullptr;
     RuntimeProfile::Counter* _inverted_index_searcher_open_timer = nullptr;
     RuntimeProfile::Counter* _inverted_index_searcher_search_timer = nullptr;
-    RuntimeProfile::Counter* _inverted_index_searcher_bitmap_timer = nullptr;
 
     RuntimeProfile::Counter* _output_index_result_column_timer = nullptr;
 
diff --git a/be/src/vec/exec/scan/new_olap_scanner.cpp 
b/be/src/vec/exec/scan/new_olap_scanner.cpp
index 80af93eff2..1eea0afaa8 100644
--- a/be/src/vec/exec/scan/new_olap_scanner.cpp
+++ b/be/src/vec/exec/scan/new_olap_scanner.cpp
@@ -515,8 +515,6 @@ void NewOlapScanner::_update_counters_before_close() {
                    stats.inverted_index_searcher_open_timer);
     COUNTER_UPDATE(olap_parent->_inverted_index_searcher_search_timer,
                    stats.inverted_index_searcher_search_timer);
-    COUNTER_UPDATE(olap_parent->_inverted_index_searcher_bitmap_timer,
-                   stats.inverted_index_searcher_bitmap_timer);
 
     COUNTER_UPDATE(olap_parent->_output_index_result_column_timer,
                    stats.output_index_result_column_timer);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to