再补充一个:
TSO时间转换
方式一:使用函数TIDB_PARSE_TSO
SELECT TIDB_PARSE_TSO(437447897305317376);
+------------------------------------+
| TIDB_PARSE_TSO(437447897305317376) |
+------------------------------------+
| 2022-11-18 08:28:17.704000 |
+------------------------------------+
1 row in set (0.25 sec)
方法二:使用pd-ctl
~$ tiup ctl:v6.4.0 pd -i -u http://pdip:2379
Starting component `ctl`: /Users/xxx/.tiup/components/ctl/v6.4.0/ctl pd -i -u http://pdip:2379
» tso 437447897305317376
system: 2022-11-18 08:28:17.704 +0800 CST
logic: 0