You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/06/09 16:04:54 UTC

[GitHub] [incubator-doris] morningman opened a new pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

morningman opened a new pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808


   ISSUE: #3365 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
EmmyMiao87 commented on a change in pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808#discussion_r439329406



##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead
+    * RowsRead
+    * RowsReturned
+
+    当读取一个 V2 格式的 Segment 时,首先会根据 Key range(前缀key组成的查询范围)进行一次过滤,过滤掉的行数记录在 `RowsKeyRangeFiltered` 中。之后,再利用 Bitmap 索引过滤数据,过滤掉的行数记录在 `RowsBitmapIndexFiltered` 中。之后,再利用 BloomFilter 索引过滤数据,记录在 `RowsBloomFilterFiltered` 中。`RowsBloomFilterFiltered` 的值是 Segment 的总行数(而不是Bitmap索引过滤后的行数)和经过 BloomFilter 过滤后剩余行数的差值,因此 BloomFilter 过滤掉的数据可能会和 Bitmap 过滤掉的数据有重叠。
+
+    `RowsStatsFiltered` 中记录的是经过其他谓词条件过滤掉的行数,这里包括下推到存储引擎的谓词条件,以及存储引擎中的 Delete 条件。
+    
+    `RowsDelFiltered` 中包含了 `RowsBloomFilterFiltered` 和 `RowsStatsFiltered` 记录的过滤行数。
+    
+    `RawRowsRead` 是经过上述过滤后,最终需要读取的行数。而 `RowsRead` 是最终返回给 Scanner 的行数。`RowsRead` 通常小于 `RawRowsRead`,是因为从存储引擎返回到 Scanner,可能会经过一次数据聚合。
+    
+    `RowsReturned` 是 ScanNode 最终返回给上层节点的行数。`RowsReturned` 通常也会小于 
+`RowsRead`。因为在 Scanner 上会有一些没有下推给存储引擎的谓词条件,会进行一次过滤。
+
+    通过以上指标,可以大致分析出存储引擎处理的行数以及最终过滤后的结果行数大小。通过 `Rows***Filtered` 这组指标,也可以分析查询条件是否下推到了存储引擎,以及不同索引的过滤效果。
+    
+    如果 `RawRowsRead` 和 `RowsRead` 差距较大,则说明大量的行被聚合,而聚合可能比较耗时。如果 `RowsRead` 和 `RowsReturned` 差距较大,则说明很多行在 Scanner 中进行了过滤。这说明很多选择度高的谓词条件并没有推送给存储引擎。而在 Scanner 中的过滤效率会比在存储引擎中过滤效率差。

Review comment:
       好吧




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808#discussion_r439286764



##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead
+    * RowsRead
+    * RowsReturned
+

Review comment:
       我增加一下说明。这里不写v1了




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808#discussion_r439287609



##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead
+    * RowsRead
+    * RowsReturned
+
+    当读取一个 V2 格式的 Segment 时,首先会根据 Key range(前缀key组成的查询范围)进行一次过滤,过滤掉的行数记录在 `RowsKeyRangeFiltered` 中。之后,再利用 Bitmap 索引过滤数据,过滤掉的行数记录在 `RowsBitmapIndexFiltered` 中。之后,再利用 BloomFilter 索引过滤数据,记录在 `RowsBloomFilterFiltered` 中。`RowsBloomFilterFiltered` 的值是 Segment 的总行数(而不是Bitmap索引过滤后的行数)和经过 BloomFilter 过滤后剩余行数的差值,因此 BloomFilter 过滤掉的数据可能会和 Bitmap 过滤掉的数据有重叠。
+
+    `RowsStatsFiltered` 中记录的是经过其他谓词条件过滤掉的行数,这里包括下推到存储引擎的谓词条件,以及存储引擎中的 Delete 条件。
+    
+    `RowsDelFiltered` 中包含了 `RowsBloomFilterFiltered` 和 `RowsStatsFiltered` 记录的过滤行数。
+    
+    `RawRowsRead` 是经过上述过滤后,最终需要读取的行数。而 `RowsRead` 是最终返回给 Scanner 的行数。`RowsRead` 通常小于 `RawRowsRead`,是因为从存储引擎返回到 Scanner,可能会经过一次数据聚合。
+    
+    `RowsReturned` 是 ScanNode 最终返回给上层节点的行数。`RowsReturned` 通常也会小于 
+`RowsRead`。因为在 Scanner 上会有一些没有下推给存储引擎的谓词条件,会进行一次过滤。
+
+    通过以上指标,可以大致分析出存储引擎处理的行数以及最终过滤后的结果行数大小。通过 `Rows***Filtered` 这组指标,也可以分析查询条件是否下推到了存储引擎,以及不同索引的过滤效果。
+    
+    如果 `RawRowsRead` 和 `RowsRead` 差距较大,则说明大量的行被聚合,而聚合可能比较耗时。如果 `RowsRead` 和 `RowsReturned` 差距较大,则说明很多行在 Scanner 中进行了过滤。这说明很多选择度高的谓词条件并没有推送给存储引擎。而在 Scanner 中的过滤效率会比在存储引擎中过滤效率差。

Review comment:
       上面一节是单独描述了下过滤行数相关的说明。
   
   简单分析 主要是从整体做分析。




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808#discussion_r439279242



##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead

Review comment:
       V1 也有,但是v1比较乱,就不写了




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
EmmyMiao87 commented on a change in pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808#discussion_r439241779



##########
File path: docs/en/administrator-guide/running-profile.md
##########
@@ -127,21 +127,105 @@ There are many statistical information collected at BE.  so we list the correspo
   - HashProbe:  Number of hashtable probe
   - HashTravelLength:  The number of steps moved when hashtable queries
 
-#### OLAP_SCAN_NODE:
- - BytesRead: Total data
- - TotalReadThroughput:Throughput = BytesRead / Time
- - TabletCount: Number of scanned tablets
- - RowsPushedCondFiltered:Number of filters pushed down
- - RawRowsRead: Number of rows read
- - RowsReturned: Number of rows returned by the node
- - RowsReturnedRate: Rate of rows returned
- - PeakMemoryUsage: Peak memory usage of the node
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+The `OLAP_SCAN_NODE` is responsible for specific data scanning tasks. One `OLAP_SCAN_NODE` will generate one or more `OlapScanner` threads. Each Scanner thread is responsible for scanning part of the data.
+
+Some or all of the predicate conditions in the query will be pushed to `OLAP_SCAN_NODE`. Some of these predicate conditions will continue to be pushed down to the storage engine in order to use the storage engine's index for data filtering. The other part will be kept in `OLAP_SCAN_NODE` to filter the data returned from the storage engine.
+
+The profile of a typical `OLAP_SCAN_NODE` is as follows. Some indicators will have different meanings depending on the storage format (V1 or V2).
+
+```
+OLAP_SCAN_NODE (id=0): (Active: 4.050ms, non-child: 35.68%)
+   -BitmapIndexFilterCount: 0   # Number of rows filtered by bitmap index

Review comment:
       You already change this param name above.

##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。

Review comment:
       You already change this param name




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
EmmyMiao87 commented on a change in pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808#discussion_r439275209



##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead
+    * RowsRead
+    * RowsReturned
+
+    当读取一个 V2 格式的 Segment 时,首先会根据 Key range(前缀key组成的查询范围)进行一次过滤,过滤掉的行数记录在 `RowsKeyRangeFiltered` 中。之后,再利用 Bitmap 索引过滤数据,过滤掉的行数记录在 `RowsBitmapIndexFiltered` 中。之后,再利用 BloomFilter 索引过滤数据,记录在 `RowsBloomFilterFiltered` 中。`RowsBloomFilterFiltered` 的值是 Segment 的总行数(而不是Bitmap索引过滤后的行数)和经过 BloomFilter 过滤后剩余行数的差值,因此 BloomFilter 过滤掉的数据可能会和 Bitmap 过滤掉的数据有重叠。
+
+    `RowsStatsFiltered` 中记录的是经过其他谓词条件过滤掉的行数,这里包括下推到存储引擎的谓词条件,以及存储引擎中的 Delete 条件。
+    
+    `RowsDelFiltered` 中包含了 `RowsBloomFilterFiltered` 和 `RowsStatsFiltered` 记录的过滤行数。
+    
+    `RawRowsRead` 是经过上述过滤后,最终需要读取的行数。而 `RowsRead` 是最终返回给 Scanner 的行数。`RowsRead` 通常小于 `RawRowsRead`,是因为从存储引擎返回到 Scanner,可能会经过一次数据聚合。
+    
+    `RowsReturned` 是 ScanNode 最终返回给上层节点的行数。`RowsReturned` 通常也会小于 
+`RowsRead`。因为在 Scanner 上会有一些没有下推给存储引擎的谓词条件,会进行一次过滤。
+
+    通过以上指标,可以大致分析出存储引擎处理的行数以及最终过滤后的结果行数大小。通过 `Rows***Filtered` 这组指标,也可以分析查询条件是否下推到了存储引擎,以及不同索引的过滤效果。
+    
+    如果 `RawRowsRead` 和 `RowsRead` 差距较大,则说明大量的行被聚合,而聚合可能比较耗时。如果 `RowsRead` 和 `RowsReturned` 差距较大,则说明很多行在 Scanner 中进行了过滤。这说明很多选择度高的谓词条件并没有推送给存储引擎。而在 Scanner 中的过滤效率会比在存储引擎中过滤效率差。

Review comment:
       感觉这一段也像简单分析?要不 直接把说完指标的含义,直接到简单分析?

##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead

Review comment:
       这些指标 V1 也有吧

##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead
+    * RowsRead
+    * RowsReturned
+
+    当读取一个 V2 格式的 Segment 时,首先会根据 Key range(前缀key组成的查询范围)进行一次过滤,过滤掉的行数记录在 `RowsKeyRangeFiltered` 中。之后,再利用 Bitmap 索引过滤数据,过滤掉的行数记录在 `RowsBitmapIndexFiltered` 中。之后,再利用 BloomFilter 索引过滤数据,记录在 `RowsBloomFilterFiltered` 中。`RowsBloomFilterFiltered` 的值是 Segment 的总行数(而不是Bitmap索引过滤后的行数)和经过 BloomFilter 过滤后剩余行数的差值,因此 BloomFilter 过滤掉的数据可能会和 Bitmap 过滤掉的数据有重叠。
+
+    `RowsStatsFiltered` 中记录的是经过其他谓词条件过滤掉的行数,这里包括下推到存储引擎的谓词条件,以及存储引擎中的 Delete 条件。
+    
+    `RowsDelFiltered` 中包含了 `RowsBloomFilterFiltered` 和 `RowsStatsFiltered` 记录的过滤行数。
+    
+    `RawRowsRead` 是经过上述过滤后,最终需要读取的行数。而 `RowsRead` 是最终返回给 Scanner 的行数。`RowsRead` 通常小于 `RawRowsRead`,是因为从存储引擎返回到 Scanner,可能会经过一次数据聚合。
+    
+    `RowsReturned` 是 ScanNode 最终返回给上层节点的行数。`RowsReturned` 通常也会小于 
+`RowsRead`。因为在 Scanner 上会有一些没有下推给存储引擎的谓词条件,会进行一次过滤。
+
+    通过以上指标,可以大致分析出存储引擎处理的行数以及最终过滤后的结果行数大小。通过 `Rows***Filtered` 这组指标,也可以分析查询条件是否下推到了存储引擎,以及不同索引的过滤效果。
+    
+    如果 `RawRowsRead` 和 `RowsRead` 差距较大,则说明大量的行被聚合,而聚合可能比较耗时。如果 `RowsRead` 和 `RowsReturned` 差距较大,则说明很多行在 Scanner 中进行了过滤。这说明很多选择度高的谓词条件并没有推送给存储引擎。而在 Scanner 中的过滤效率会比在存储引擎中过滤效率差。

Review comment:
       应该是说,有些选择度高的谓词条件没有在存储引擎中通过索引过滤吧?而Scanner 中的过滤效率比存储引擎中利用索引过滤效率差。

##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead
+    * RowsRead
+    * RowsReturned
+
+    当读取一个 V2 格式的 Segment 时,首先会根据 Key range(前缀key组成的查询范围)进行一次过滤,过滤掉的行数记录在 `RowsKeyRangeFiltered` 中。之后,再利用 Bitmap 索引过滤数据,过滤掉的行数记录在 `RowsBitmapIndexFiltered` 中。之后,再利用 BloomFilter 索引过滤数据,记录在 `RowsBloomFilterFiltered` 中。`RowsBloomFilterFiltered` 的值是 Segment 的总行数(而不是Bitmap索引过滤后的行数)和经过 BloomFilter 过滤后剩余行数的差值,因此 BloomFilter 过滤掉的数据可能会和 Bitmap 过滤掉的数据有重叠。
+
+    `RowsStatsFiltered` 中记录的是经过其他谓词条件过滤掉的行数,这里包括下推到存储引擎的谓词条件,以及存储引擎中的 Delete 条件。
+    
+    `RowsDelFiltered` 中包含了 `RowsBloomFilterFiltered` 和 `RowsStatsFiltered` 记录的过滤行数。
+    
+    `RawRowsRead` 是经过上述过滤后,最终需要读取的行数。而 `RowsRead` 是最终返回给 Scanner 的行数。`RowsRead` 通常小于 `RawRowsRead`,是因为从存储引擎返回到 Scanner,可能会经过一次数据聚合。
+    
+    `RowsReturned` 是 ScanNode 最终返回给上层节点的行数。`RowsReturned` 通常也会小于 
+`RowsRead`。因为在 Scanner 上会有一些没有下推给存储引擎的谓词条件,会进行一次过滤。
+
+    通过以上指标,可以大致分析出存储引擎处理的行数以及最终过滤后的结果行数大小。通过 `Rows***Filtered` 这组指标,也可以分析查询条件是否下推到了存储引擎,以及不同索引的过滤效果。
+    
+    如果 `RawRowsRead` 和 `RowsRead` 差距较大,则说明大量的行被聚合,而聚合可能比较耗时。如果 `RowsRead` 和 `RowsReturned` 差距较大,则说明很多行在 Scanner 中进行了过滤。这说明很多选择度高的谓词条件并没有推送给存储引擎。而在 Scanner 中的过滤效率会比在存储引擎中过滤效率差。
+    
+* Scan Node Profile 的简单分析
+
+    OlapScanNode 的 Profile 通常用于分析数据扫描的效率。除了前面介绍的通过行数相关信息可以推断谓词条件下推和索引使用情况外,还可以通过以下几个方面进行简单的分析。
+    
+    * 首先,很多指标,如 `IOTimer`,`BlockFetchTime` 等都是所有 Scanner 线程指标的累加,因此数值可能会比较大。并且因为 Scanner 线程是异步读取数据的,所以这些累加指标只能反映 Scanner 累加的工作时间,并不直接代表 ScanNode 的耗时。ScanNode 在整个查询计划中的耗时占比为 `Active` 字段记录的值。有时会出现比如 `IOTimer` 有几十秒,而 `Active` 实际只有几秒钟。这种情况通常因为:1. `IOTimer` 为多个 Scanner 的累加时间,而 Scanner 数量较多。2. 上层节点比较耗时。比如上层节点耗时 100秒,而底层 ScanNode 只需 10秒。则反映在 `Active` 的字段可能只有几毫秒。因为在上层处理数据的同时,ScanNode 已经异步的进行了数据扫描并准备好了数据。当上层节点从 ScanNode 获取数据时,可以获取到已经准备好的数据,因此 Active 时间很短。

Review comment:
       这一行的格式是不是有问题?

##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。
+   - BitmapIndexFilterTimer: 0.000ns    # 利用 bitmap 索引过滤数据的耗时。
+   - BlockConvertTime: 7.433ms  # 将向量化Block转换为行结构的 RowBlock 的耗时。向量化 Block 在 V1 中为 VectorizedRowBatch,V2中为 RowBlockV2。
+   - BlockFetchTime: 36.934ms   # Rowset Reader 获取 Block 的时间。
+   - BlockLoadTime: 23.368ms    # SegmentReader(V1) 或 SegmentIterator(V2) 获取 block 的时间。
+   - BlockSeekCount: 0  # 读取 Segment 时进行 block seek 的次数。
+   - BlockSeekTime: 3.062ms # 读取 Segment 时进行 block seek 的耗时。
+   - BlocksLoad: 221    # 读取 Block 的数量
+   - BytesRead: 6.59 MB # 从数据文件中读取到的数据量。假设读取到了是10个32位整型,则数据量为 10 * 4B = 40 Bytes。这个数据仅表示数据在内存中全展开的大小,并不代表实际的 IO 大小。
+   - CachedPagesNum: 0  # 仅 V2 中,当开启 PageCache 后,命中 Cache 的 Page 数量。
+   - CompressedBytesRead: 1.36 MB   # V1 中,从文件中读取的解压前的数据大小。V2 中,读取到的没有命中 PageCache 的 Page 的压缩前的大小。
+   - DecompressorTimer: 4.194ms # 数据解压耗时。
+   - IOTimer: 1.404ms   # 实际从操作系统读取数据的 IO 时间。
+   - IndexLoadTime: 1.521ms # 仅 V1 中,读取 Index Stream 的耗时。
+   - NumDiskAccess: 6   # 该 ScanNode 节点涉及到的磁盘数量。
+   - NumScanners: 25    # 该 ScanNode 生成的 Scanner 数量。
+   - PeakMemoryUsage: 0     # 无意义
+   - PerReadThreadRawHdfsThroughput: 0.00 /sec  # 无意义
+   - RawRowsRead: 141.71K   # 存储引擎中读取的原始行数。详情见下文。
+   - ReaderInitTime: 16.515ms   # OlapScanner 初始化 Reader 的时间。V1 中包括组建 MergeHeap 的时间。V2 中包括生成各级 Iterator 并读取第一组Block的时间。
+   - RowsBloomFilterFiltered: 0 # 仅 V2 中,通过 BloomFilter 索引过滤掉的行数。
+   - RowsDelFiltered: 0     # V1 中表示根据 delete 条件过滤掉的行数。V2 中还包括通过 BloomFilter 和部分谓词条件过滤掉的行数。
+   - RowsPushedCondFiltered: 0  # 根据传递下推的谓词过滤掉的条件,比如 Join 计算中从 BuildTable 传递给 ProbeTable 的条件。该数值不准确,因为如果过滤效果差,就不再过滤了。
+   - RowsRead: 132.78K  # 从存储引擎返回到 Scanner 的行数,不包括经 Scanner 过滤的行数。
+   - RowsReturned: 132.78K  # 从 ScanNode 返回给上层节点的行数。
+   - RowsReturnedRate: 32.78 M/sec  # RowsReturned/ActiveTime
+   - RowsStatsFiltered: 0   # V2 中,包含谓词条件根据 Zonemap 过滤掉的行数。V1 中还包含通过 BloomFilter 过滤掉的行数。
+   - RowsVectorPredFiltered: 0  # 通过向量化条件过滤操作过滤掉的行数。
+   - ScanTime: 49.239ms:Scanner 调用 get_next() 方法的耗时统计。
+   - ScannerThreadsInvoluntaryContextSwitches: 0    # 无意义
+   - ScannerThreadsTotalWallClockTime: 0.000ns  # 无意义
+     - MaterializeTupleTime(*): 0.000ns # 无意义
+     - ScannerThreadsSysTime: 0.000ns   # 无意义
+     - ScannerThreadsUserTime: 0.000ns  # 无意义
+   - ScannerThreadsVoluntaryContextSwitches: 0  # 无意义
+   - ShowHintsTime: 0.000ns # V2 中无意义。V1 中读取部分数据来进行 ScanRange 的切分。
+   - TabletCount : 25   # 该 ScanNode 涉及的 Tablet 数量。
+   - TotalPagesNum: 0   # 仅 V2 中,读取的总 Page 数量。
+   - TotalRawReadTime(*): 0.000ns   # 无意义
+   - TotalReadThroughput: 0.00 /sec # 无意义
+   - UncompressedBytesRead: 4.28 MB # V1 中为读取的数据文件解压后的大小(如果文件无需解压,则直接统计文件大小)。V2 中,仅统计未命中 PageCache 的 Page 解压后的大小(如果Page无需解压,直接统计Page大小)
+   - VectorPredEvalTime: 0.000ns    # 向量化条件过滤操作的耗时。
+```
+
+* V2 格式中关于行数的一些说明
+
+    在 Profile 中和行数相关的指标有:
+    
+    * RowsKeyRangeFiltered
+    * RowsBitmapIndexFiltered
+    * RowsBloomFilterFiltered
+    * RowsStatsFiltered
+    * RowsDelFiltered
+    * RawRowsRead
+    * RowsRead
+    * RowsReturned
+

Review comment:
       这里是不是应该先总说一下,存储引擎先根据索引过滤数据,然后scan 再过滤一次。然后在存储引擎的部分再把 v1 和 v2分着说。




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #3808: [Doc] Add docs to OLAP_SCAN_NODE query profile

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3808:
URL: https://github.com/apache/incubator-doris/pull/3808#discussion_r439251334



##########
File path: docs/zh-CN/administrator-guide/running-profile.md
##########
@@ -130,22 +133,105 @@ BE端收集的统计信息较多,下面列出了各个参数的对应含义:
   - HashProbe:  HashTable查询的次数
   - HashTravelLength:  HashTable查询时移动的步数
 
-#### OLAP_SCAN_NODE:
- - RowsProduced: 生成结果的行数
- - BytesRead: scan node 扫描数据的总量
- - TotalReadThroughput:吞吐量
- - TabletCount: tablet 的数目
- - RowsPushedCondFiltered:下推的过滤器
- - RawRowsRead: 实际读取的行数
- - RowsReturned: 该节点返回的行数
- - RowsReturnedRate: 返回行数的速率
- - PeakMemoryUsage 内存使用的峰值  
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+`OLAP_SCAN_NODE` 节点负责具体的数据扫描任务。一个 `OLAP_SCAN_NODE` 会生成一个或多个 `OlapScanner` 线程。每个 Scanner 线程负责扫描部分数据。
+
+查询中的部分或全部谓词条件会推送给 `OLAP_SCAN_NODE`。这些谓词条件中一部分会继续下推给存储引擎,以便利用存储引擎的索引进行数据过滤。另一部分会保留在 `OLAP_SCAN_NODE` 中,用于过滤从存储引擎中返回的数据。
+
+一个典型的 `OLAP_SCAN_NODE` 节点的 Profile 如下。部分指标会因存储格式的不同(V1 或 V2)而有不同含义。
+
+```
+OLAP_SCAN_NODE (id=0):(Active: 4.050ms, non-child: 35.68%)
+   - BitmapIndexFilterCount: 0  # 利用 bitmap 索引过滤掉的行数。

Review comment:
       ok

##########
File path: docs/en/administrator-guide/running-profile.md
##########
@@ -127,21 +127,105 @@ There are many statistical information collected at BE.  so we list the correspo
   - HashProbe:  Number of hashtable probe
   - HashTravelLength:  The number of steps moved when hashtable queries
 
-#### OLAP_SCAN_NODE:
- - BytesRead: Total data
- - TotalReadThroughput:Throughput = BytesRead / Time
- - TabletCount: Number of scanned tablets
- - RowsPushedCondFiltered:Number of filters pushed down
- - RawRowsRead: Number of rows read
- - RowsReturned: Number of rows returned by the node
- - RowsReturnedRate: Rate of rows returned
- - PeakMemoryUsage: Peak memory usage of the node
-
-#### Buffer pool:
+#### `OLAP_SCAN_NODE`
+
+The `OLAP_SCAN_NODE` is responsible for specific data scanning tasks. One `OLAP_SCAN_NODE` will generate one or more `OlapScanner` threads. Each Scanner thread is responsible for scanning part of the data.
+
+Some or all of the predicate conditions in the query will be pushed to `OLAP_SCAN_NODE`. Some of these predicate conditions will continue to be pushed down to the storage engine in order to use the storage engine's index for data filtering. The other part will be kept in `OLAP_SCAN_NODE` to filter the data returned from the storage engine.
+
+The profile of a typical `OLAP_SCAN_NODE` is as follows. Some indicators will have different meanings depending on the storage format (V1 or V2).
+
+```
+OLAP_SCAN_NODE (id=0): (Active: 4.050ms, non-child: 35.68%)
+   -BitmapIndexFilterCount: 0   # Number of rows filtered by bitmap index

Review comment:
       ok




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org