What types of SQL do not require obtaining TSO?

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

Original topic: 什么类型的SQL不需要获取TSO

| username: alfred

【TiDB Usage Environment】Production\Testing Environment\POC
【TiDB Version】
【Encountered Issues】
【Reproduction Path】What operations were performed that led to the issue
【Issue Phenomenon and Impact】
【Attachments】

  • Relevant logs, configuration files, Grafana monitoring (https://metricstool.pingcap.com/)
  • TiUP Cluster Display information
  • TiUP Cluster Edit config information
  • TiDB-Overview monitoring
  • Corresponding module Grafana monitoring (if any, such as BR, TiDB-binlog, TiCDC, etc.)
  • Corresponding module logs (including logs from 1 hour before and after the issue)

As described officially, “During the execute phase, TiDB interacts with PD and TiKV. As shown in the figure below, when TiDB processes SQL statement requests, before parsing and compiling, if it needs to obtain TSO, it will first request to generate TSO.”

So, what types of SQL do not need to obtain TSO? Or in what situations do SQL statements not need to obtain TSO? Additionally, is the TSO acquisition for SQL statements generally completed before parsing and compiling, or is it done in parallel with parsing and compiling?


If the question is related to performance optimization or troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output results for upload.

| username: gary | Original post link

Logically, TSO should be required. The write process obtains TSO before parsing, and once more in the Transaction module.

| username: alfred | Original post link

Looking at this statement, it seems that some SQL statements do not need to obtain TSO.

| username: 特雷西-迈克-格雷迪 | Original post link

Both SELECT and DML need to obtain TSO.

| username: HACK | Original post link

It seems that poingget does not require TSO. Additionally, obtaining TSO and compiling are done in parallel, which improves processing efficiency.

| username: forever | Original post link

DDL should not require TSO.

| username: alfred | Original post link

All reads need to obtain TSO, but it’s still unclear whether DDL needs to obtain TSO?

| username: system | Original post link

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