Skip to content

Commit

Permalink
*: remove the restriction for building range scan for LIKE on new c…
Browse files Browse the repository at this point in the history
…ollation columns (#15781)
  • Loading branch information
time-and-fate authored Jan 22, 2024
1 parent d32dba8 commit f4c96ad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions character-set-and-collation.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ SHOW COLLATION;
> **Warning:**
>
> TiDB incorrectly treats latin1 as a subset of utf8. This can lead to unexpected behaviors when you store characters that differ between latin1 and utf8 encodings. It is strongly recommended to the utf8mb4 character set. See [TiDB #18955](https://github.com/pingcap/tidb/issues/18955) for more details.
>
> If the predicates include `LIKE` for string prefixes, such as `LIKE 'prefix%'`, and the target column is set to a non-binary collation (the suffix does not end with `_bin`), the optimizer currently cannot convert this predicate into a range scan. Instead, it performs a full scan. As a result, such SQL queries might lead to unexpected resource consumption.
> **Note:**
>
Expand Down
2 changes: 0 additions & 2 deletions character-set-gbk.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ In the above table, the result of `SELECT HEX('a');` in the `utf8mb4` byte set i

- Currently, for binary characters of the `ENUM` and `SET` types, TiDB deals with them as the `utf8mb4` character set.

- If the predicates include `LIKE` for string prefixes, such as `LIKE 'prefix%'`, and the target column is set to a GBK collation (either `gbk_bin` or `gbk_chinese_ci`), the optimizer currently cannot convert this predicate into a range scan. Instead, it performs a full scan. As a result, such SQL queries might lead to unexpected resource consumption.

## Component compatibility

- Currently, TiFlash does not support the GBK character set.
Expand Down

0 comments on commit f4c96ad

Please sign in to comment.