TiFlash

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tiflash

| username: 林夕一指

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] V6.5.0
[Encountered Problem: Problem Phenomenon and Impact] When using TiFlash replicas for aggregation statistics, why does the execution plan perform a full partition scan instead of using the index?
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]

Table Structure:
CREATE TABLE lpcs_mt_result (
id bigint(16) NOT NULL
/*T![auto_rand] AUTO_RANDOM(5) */
COMMENT ‘id’,
message_result varchar(20) NOT NULL,
provider_type varchar(16) NOT NULL DEFAULT ‘’,
sign varchar(64) NOT NULL DEFAULT ‘’,
PRIMARY KEY (id, request_time)
/*T![clustered_index] CLUSTERED */,
KEY idx_messageresult_providertype_sign (message_result, provider_type, sign)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin

| username: zhanggame1 | Original post link

How can there be an index if it goes tilfash?

| username: 林夕一指 | Original post link

I thought that when building a TiFlash replica, it would also have the same index data.

| username: zhanggame1 | Original post link

The TiFlash columnar storage engine should scan all data for specific columns during queries.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.