Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed Sep 4, 2023
1 parent 92b2d1f commit dca0c7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sql-prepared-plan-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ In the current version of TiDB, if a `Prepare` statement meets any of the follow
- The query contains parameters for comparing `int` and `string`, such as `c_int >= ?` or `c_int in (?, ?)`, in which `?` indicates the string type, such as `set @x='123'`. To ensure that the query result is compatible with MySQL, parameters need to be adjusted in each query, so such queries are not cached.
- The plan attempts to access `TiFlash`.
- In most cases, the plan that contains `TableDual` is not cached, unless the current `Prepare` statement does not have parameters.
- The query accessing TiDB system views, such as `information_schema.columns`, and it is not recommended to use `Prepare` and `Execute` statements to access system views.

TiDB has a limitation on the number of `?`, if a query has more than 65535 `?`, the error `Prepared statement contains too many placeholders` will be returned.

Expand Down

0 comments on commit dca0c7b

Please sign in to comment.