pingcap / pingcap/tiflash

optimize `like` performance when new collation is enabled.

Open
#2,086 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/enhancement
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Currently, if new collation is enabled, like will use Collator::match to do a collation sensitive match, it is not very efficient, maybe we can try to optimize it for some special cases(for example a like '%abc' is actually a suffix match).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the new-collation LIKE path that calls Collator::match and identify where pattern-specific cases could be handled. Investigate suffix patterns such as a like '%abc' and compare their behavior and performance with the general collation-sensitive match. Done means a justified optimization for supported special cases with behavior and performance coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.