The Execution Process of a Simple Query SQL in TiDB

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

Original topic: 一条简单的查询SQL在TIDB中的运行流程

| username: residentevil

[TiDB Usage Environment] Production Environment
[TiDB Version] V6.1.7
[Encountered Problem: Problem Phenomenon and Impact] How a simple query SQL runs in TiDB, especially the detailed process of accessing the three modules [TiDB, PD, KV].

| username: residentevil | Original post link

Is the explanation in this link correct?

| username: Kongdom | Original post link

The 5th lesson should be what you need. The link you posted is the notes for this lesson.
https://learn.pingcap.com/learner/course/120005

| username: residentevil | Original post link

Okay, I’ll study it carefully, thank you.

| username: Kongdom | Original post link

:handshake: :handshake: :handshake:

| username: residentevil | Original post link

If the number of REGIONS exceeds one million, can the REGION CACHE in the TIKV CLIENT cache them? Is there a hit rate for the REGION CACHE? Or is there a parameter that can modify this parameter?

| username: residentevil | Original post link

I saw the parameter tikv-client.region-cache-ttl, but I don’t know what its function is and whether it can be modified.

| username: Kongdom | Original post link

You can modify it in the TiDB configuration file

| username: residentevil | Original post link

I’ll take a look at the documentation, thank you.

| username: 大飞哥online | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: 大飞哥online | Original post link

| username: residentevil | Original post link

For write operations, the entire chain is indeed too long, and there is a mitigation to directly impact the performance of writes with latency.

| username: 大飞哥online | Original post link

When writing, the WAL should be written first. Once this is done, everything else is easy to handle. Even if the sstable hasn’t been flushed to disk and a crash occurs, it can be recovered from the WAL.

| username: Fly-bird | Original post link

tidb-pd-tikv

| username: Kongdom | Original post link

In distributed systems, some steps are unavoidable.

| username: 喵父666 | Original post link

There are official learning videos available, you can check them out.

| username: system | Original post link

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