This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 60b3e67ce0b add some FAQ for high-concurrent-point-query (#2602)
60b3e67ce0b is described below
commit 60b3e67ce0b53b61c057453b00103f0b543c11df
Author: lihangyu <[email protected]>
AuthorDate: Tue Jul 8 14:09:43 2025 +0800
add some FAQ for high-concurrent-point-query (#2602)
## Versions
- [x] dev
- [x] 3.0
- [x] 2.1
- [x] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
.../high-concurrent-point-query.md | 21 ++++++++++++++++++++
.../high-concurrent-point-query.md | 22 ++++++++++++++++++++-
.../query/high-concurrent-point-query.md | 21 +++++++++++++++++++-
.../high-concurrent-point-query.md | 21 +++++++++++++++++++-
.../high-concurrent-point-query.md | 21 +++++++++++++++++++-
.../query/high-concurrent-point-query.md | 23 +++++++++++++++++++++-
.../high-concurrent-point-query.md | 21 ++++++++++++++++++++
.../high-concurrent-point-query.md | 21 ++++++++++++++++++++
8 files changed, 166 insertions(+), 5 deletions(-)
diff --git a/docs/query-acceleration/high-concurrent-point-query.md
b/docs/query-acceleration/high-concurrent-point-query.md
index 7d7d57ab48f..2113aea6f71 100644
--- a/docs/query-acceleration/high-concurrent-point-query.md
+++ b/docs/query-acceleration/high-concurrent-point-query.md
@@ -163,3 +163,24 @@ A: Prepared Statement currently only takes effect when
primary key is checked.
#### **5. Does optimizer selection require global settings?**
A: When using prepared statement for query, Doris will choose the query method
with the best performance, and there is no need to manually set the optimizer.
+
+#### **6. What should we do when the FE becomes a bottleneck?**
+
+A: If the FE is consuming too much CPU (i.e., high %CPU usage), enable the
following configuration in the JDBC URL:
+
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- Enable loadbalance to ensure multiple FEs can serve requests, and the more
FE instances, the better (deploy one per instance).
+- Enable useServerPrepStmts to reduce parsing and planning overhead on the FE.
+- Enable cachePrepStmts so the client caches prepared statements, reducing the
need to frequently send prepare requests to the FE.
+- Adjust prepStmtCacheSize to set the maximum number of cached query templates.
+- Adjust prepStmtCacheSqlLimit to set the maximum length of a single cached
SQL template.
+
+#### **7. How to optimize query performance under a compute-storage separation
architecture?**
+
+A:
+
+- `set global enable_snapshot_point_query = false`. Point queries require an
additional RPC to the meta service to obtain the version, which can easily
become a bottleneck under high QPS. Setting it to false can speed up queries
but reduces data visibility (requires a trade-off between performance and
consistency).
+
+- Configure the BE parameter enable_file_cache_keep_base_compaction_output=1
so that the result data after base compaction is stored in the cache, avoiding
query jitter caused by remote access.
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/high-concurrent-point-query.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/high-concurrent-point-query.md
index 9ccc24b6053..508dbcb28e9 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/high-concurrent-point-query.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/query-acceleration/high-concurrent-point-query.md
@@ -161,4 +161,24 @@ A:Prepared Statement 目前只在主键点查的情况下生效
#### Q5. 优化器选择需要进行全局设置吗
-A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
\ No newline at end of file
+A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
+
+#### Q6. FE 成为瓶颈怎么处理?
+
+A:如果占用过高 cpu,%CPU 过高,则在 jdbc url 开启以下配置
+
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- 打开 loadbalance 确保多个 FE 都能提供服务,并且 FE 数量越多越好 (每个实例都部署一个)
+- 打开 useServerPrepStmts,减少 fe 解析、规划开销
+- 打开 cachePrepStmts 客户端缓存 prepared statement,不用频繁向 FE 发送 prepared 请求
+- 调整 prepStmtCacheSize,设置最大可缓存的查询模版数量 ()
+- 调整 prepStmtCacheSqlLimit,设置单条缓存的 SQL 模版的最大长度
+
+#### Q7. 存算分离下怎么优化查询性能?
+
+A:
+
+- `set global enable_snapshot_point_query = false`, 点查从 meta service 获取
version 会多一次额外的 RPC,并且 meta service 在高 QPS 场景下容易成为瓶颈,设置成 false
可以加速查询但是会降低数据可见性(需权衡性能和可见性)
+- 配置 BE 参数 enable_file_cache_keep_base_compaction_output=1,使得 Base Compact
后的结果数据放入缓存,避免远程访问导致的查询抖动。
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/high-concurrent-point-query.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/high-concurrent-point-query.md
index 0ee50d6a0f6..a1b036e4cfb 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/high-concurrent-point-query.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/query/high-concurrent-point-query.md
@@ -154,4 +154,23 @@ A:Prepared Statement 目前只在主键点查的情况下生效
**5. 优化器选择需要进行全局设置吗**
-A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
\ No newline at end of file
+A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
+
+**6. FE 成为瓶颈怎么处理?**
+
+A:如果占用过高 cpu,%CPU 过高,则在 jdbc url 开启以下配置
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- 打开 loadbalance 确保多个 FE 都能提供服务,并且 FE 数量越多越好 (每个实例都部署一个)
+- 打开 useServerPrepStmts,减少 fe 解析、规划开销
+- 打开 cachePrepStmts 客户端缓存 prepared statement,不用频繁向 FE 发送 prepared 请求
+- 调整 prepStmtCacheSize,设置最大可缓存的查询模版数量 ()
+- 调整 prepStmtCacheSqlLimit,设置单条缓存的 SQL 模版的最大长度
+
+**7. 存算分离下怎么优化查询性能?**
+
+A:
+
+- `set global enable_snapshot_point_query = false`, 点查从 meta service 获取
version 会多一次额外的 RPC,并且 meta service 在高 QPS 场景下容易成为瓶颈,设置成 false
可以加速查询但是会降低数据可见性(需权衡性能和可见性)
+- 配置 BE 参数 enable_file_cache_keep_base_compaction_output=1,使得 Base Compact
后的结果数据放入缓存,避免远程访问导致的查询抖动。
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/high-concurrent-point-query.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/high-concurrent-point-query.md
index b06005b9374..5862f0ee79a 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/high-concurrent-point-query.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/query-acceleration/high-concurrent-point-query.md
@@ -161,4 +161,23 @@ A:Prepared Statement 目前只在主键点查的情况下生效
#### Q5. 优化器选择需要进行全局设置吗
-A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
\ No newline at end of file
+A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
+
+#### Q6. FE 成为瓶颈怎么处理?
+
+A:如果占用过高 cpu,%CPU 过高,则在 jdbc url 开启以下配置
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- 打开 loadbalance 确保多个 FE 都能提供服务,并且 FE 数量越多越好 (每个实例都部署一个)
+- 打开 useServerPrepStmts,减少 fe 解析、规划开销
+- 打开 cachePrepStmts 客户端缓存 prepared statement,不用频繁向 FE 发送 prepared 请求
+- 调整 prepStmtCacheSize,设置最大可缓存的查询模版数量 ()
+- 调整 prepStmtCacheSqlLimit,设置单条缓存的 SQL 模版的最大长度
+
+#### Q7. 存算分离下怎么优化查询性能?
+
+A:
+
+- `set global enable_snapshot_point_query = false`, 点查从 meta service 获取
version 会多一次额外的 RPC,并且 meta service 在高 QPS 场景下容易成为瓶颈,设置成 false
可以加速查询但是会降低数据可见性(需权衡性能和可见性)
+- 配置 BE 参数 enable_file_cache_keep_base_compaction_output=1,使得 Base Compact
后的结果数据放入缓存,避免远程访问导致的查询抖动。
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-acceleration/high-concurrent-point-query.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-acceleration/high-concurrent-point-query.md
index b06005b9374..5862f0ee79a 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-acceleration/high-concurrent-point-query.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/query-acceleration/high-concurrent-point-query.md
@@ -161,4 +161,23 @@ A:Prepared Statement 目前只在主键点查的情况下生效
#### Q5. 优化器选择需要进行全局设置吗
-A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
\ No newline at end of file
+A:在使用 prepared statement 进行查询时,Doris 会选择性能最好的查询方式,不需要手动设置优化器
+
+#### Q6. FE 成为瓶颈怎么处理?
+
+A:如果占用过高 cpu,%CPU 过高,则在 jdbc url 开启以下配置
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- 打开 loadbalance 确保多个 FE 都能提供服务,并且 FE 数量越多越好 (每个实例都部署一个)
+- 打开 useServerPrepStmts,减少 fe 解析、规划开销
+- 打开 cachePrepStmts 客户端缓存 prepared statement,不用频繁向 FE 发送 prepared 请求
+- 调整 prepStmtCacheSize,设置最大可缓存的查询模版数量 ()
+- 调整 prepStmtCacheSqlLimit,设置单条缓存的 SQL 模版的最大长度
+
+#### Q7. 存算分离下怎么优化查询性能?
+
+A:
+
+- `set global enable_snapshot_point_query = false`, 点查从 meta service 获取
version 会多一次额外的 RPC,并且 meta service 在高 QPS 场景下容易成为瓶颈,设置成 false
可以加速查询但是会降低数据可见性(需权衡性能和可见性)
+- 配置 BE 参数 enable_file_cache_keep_base_compaction_output=1,使得 Base Compact
后的结果数据放入缓存,避免远程访问导致的查询抖动。
\ No newline at end of file
diff --git a/versioned_docs/version-2.0/query/high-concurrent-point-query.md
b/versioned_docs/version-2.0/query/high-concurrent-point-query.md
index 64ae210f838..29041388a3f 100644
--- a/versioned_docs/version-2.0/query/high-concurrent-point-query.md
+++ b/versioned_docs/version-2.0/query/high-concurrent-point-query.md
@@ -161,4 +161,25 @@ Doris has a page-level cache that stores data for a
specific column in each page
4. Is useServerPrepStmts useful in ordinary queries?
A: Prepared Statement currently only takes effect when primary key is
checked.
5. Does optimizer selection require global settings?
- A: When using prepared statement for query, Doris will choose the query
method with the best performance, and there is no need to manually set the
optimizer.
\ No newline at end of file
+ A: When using prepared statement for query, Doris will choose the query
method with the best performance, and there is no need to manually set the
optimizer.
+
+6. What should we do when the FE becomes a bottleneck?**
+
+ A: If the FE is consuming too much CPU (i.e., high %CPU usage), enable the
following configuration in the JDBC URL:
+
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- Enable loadbalance to ensure multiple FEs can serve requests, and the more
FE instances, the better (deploy one per instance).
+- Enable useServerPrepStmts to reduce parsing and planning overhead on the FE.
+- Enable cachePrepStmts so the client caches prepared statements, reducing the
need to frequently send prepare requests to the FE.
+- Adjust prepStmtCacheSize to set the maximum number of cached query templates.
+- Adjust prepStmtCacheSqlLimit to set the maximum length of a single cached
SQL template.
+
+7. How to optimize query performance under a compute-storage separation
architecture?**
+
+ A:
+
+- `set global enable_snapshot_point_query = false`. Point queries require an
additional RPC to the meta service to obtain the version, which can easily
become a bottleneck under high QPS. Setting it to false can speed up queries
but reduces data visibility (requires a trade-off between performance and
consistency).
+
+- Configure the BE parameter enable_file_cache_keep_base_compaction_output=1
so that the result data after base compaction is stored in the cache, avoiding
query jitter caused by remote access.
\ No newline at end of file
diff --git
a/versioned_docs/version-2.1/query-acceleration/high-concurrent-point-query.md
b/versioned_docs/version-2.1/query-acceleration/high-concurrent-point-query.md
index 9849341f6c2..d02f46aa4a8 100644
---
a/versioned_docs/version-2.1/query-acceleration/high-concurrent-point-query.md
+++
b/versioned_docs/version-2.1/query-acceleration/high-concurrent-point-query.md
@@ -183,3 +183,24 @@ A: Prepared Statement currently only takes effect when
primary key is checked.
#### **5. Does optimizer selection require global settings?**
A: When using prepared statement for query, Doris will choose the query method
with the best performance, and there is no need to manually set the optimizer.
+
+#### **6. What should we do when the FE becomes a bottleneck?**
+
+A: If the FE is consuming too much CPU (i.e., high %CPU usage), enable the
following configuration in the JDBC URL:
+
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- Enable loadbalance to ensure multiple FEs can serve requests, and the more
FE instances, the better (deploy one per instance).
+- Enable useServerPrepStmts to reduce parsing and planning overhead on the FE.
+- Enable cachePrepStmts so the client caches prepared statements, reducing the
need to frequently send prepare requests to the FE.
+- Adjust prepStmtCacheSize to set the maximum number of cached query templates.
+- Adjust prepStmtCacheSqlLimit to set the maximum length of a single cached
SQL template.
+
+#### **7. How to optimize query performance under a compute-storage separation
architecture?**
+
+A:
+
+- `set global enable_snapshot_point_query = false`. Point queries require an
additional RPC to the meta service to obtain the version, which can easily
become a bottleneck under high QPS. Setting it to false can speed up queries
but reduces data visibility (requires a trade-off between performance and
consistency).
+
+- Configure the BE parameter enable_file_cache_keep_base_compaction_output=1
so that the result data after base compaction is stored in the cache, avoiding
query jitter caused by remote access.
diff --git
a/versioned_docs/version-3.0/query-acceleration/high-concurrent-point-query.md
b/versioned_docs/version-3.0/query-acceleration/high-concurrent-point-query.md
index 83a2d4d5bf5..b7b88bf07b4 100644
---
a/versioned_docs/version-3.0/query-acceleration/high-concurrent-point-query.md
+++
b/versioned_docs/version-3.0/query-acceleration/high-concurrent-point-query.md
@@ -183,3 +183,24 @@ A: Prepared Statement currently only takes effect when
primary key is checked.
#### **5. Does optimizer selection require global settings?**
A: When using prepared statement for query, Doris will choose the query method
with the best performance, and there is no need to manually set the optimizer.
+
+#### **6. What should we do when the FE becomes a bottleneck?**
+
+A: If the FE is consuming too much CPU (i.e., high %CPU usage), enable the
following configuration in the JDBC URL:
+
+```
+jdbc:mysql:loadbalance://[host1][:port],[host2][:port][,[host3][:port]]/${tbl_name}?useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=500&prepStmtCacheSqlLimit=1024
+```
+- Enable loadbalance to ensure multiple FEs can serve requests, and the more
FE instances, the better (deploy one per instance).
+- Enable useServerPrepStmts to reduce parsing and planning overhead on the FE.
+- Enable cachePrepStmts so the client caches prepared statements, reducing the
need to frequently send prepare requests to the FE.
+- Adjust prepStmtCacheSize to set the maximum number of cached query templates.
+- Adjust prepStmtCacheSqlLimit to set the maximum length of a single cached
SQL template.
+
+#### **7. How to optimize query performance under a compute-storage separation
architecture?**
+
+A:
+
+- `set global enable_snapshot_point_query = false`. Point queries require an
additional RPC to the meta service to obtain the version, which can easily
become a bottleneck under high QPS. Setting it to false can speed up queries
but reduces data visibility (requires a trade-off between performance and
consistency).
+
+- Configure the BE parameter enable_file_cache_keep_base_compaction_output=1
so that the result data after base compaction is stored in the cache, avoiding
query jitter caused by remote access.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]