[Doc](point query) Modify the document to add constraints and limitations for optimizing high-concurrency point queries. (#19852)

This commit is contained in:
lihangyu
2023-05-19 17:29:10 +08:00
committed by GitHub
parent 2ab844550f
commit d8d6880ef1
2 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,8 @@ PROPERTIES (
1. `enable_unique_key_merge_on_write` should be enabled, since we need primary key for quick point lookup in storage engine
2. when condition only contains primary key like `select * from tbl_point_query where key = 123`, such query will go through the short fast path
3. `light_schema_change` should also been enabled since we rely on `column unique id` of each column when doing a point query.
4. It only supports equality queries on the key column of a single table and does not support joins or nested subqueries. The WHERE condition should consist of the key column alone and be an equality comparison. It can be considered as a type of key-value query.
## Using `PreparedStatement`

View File

@ -70,6 +70,7 @@ PROPERTIES (
1. `enable_unique_key_merge_on_write`应该被开启, 存储引擎需要根据主键来快速点查
2. 当条件只包含主键时,如`select * from tbl_point_query where key = 123`,类似的查询会走短路径来优化查询
3. `light_schema_change`应该被开启, 因为主键点查的优化依赖了轻量级 Schema Change 中的`column unique id`来定位列
4. 只支持单表key列等值查询不支持join、嵌套子查询, **where条件里需要有且仅有key列的等值**, 可以认为是一种key value查询
## 使用 `PreparedStatement`