You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FAQ.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,14 @@ Yes. But it differs from MySQL in syntax. As a distributed database, TiDB uses t
77
77
78
78
The character sets of TiDB use UTF-8 by default and currently only support UTF-8. The string of TiDB uses the memcomparable format.
79
79
80
+
#### What is the length limit for the TiDB user name?
81
+
82
+
32 characters at most.
83
+
84
+
#### What is the maximum number of statements in a transaction?
85
+
86
+
5000 at most.
87
+
80
88
### TiDB techniques
81
89
82
90
#### TiKV for data storage
@@ -405,6 +413,10 @@ In the communication process between the TiDB server and the TiKV server, the `S
405
413
406
414
The current TiDB version has no limit for the maximum number of concurrent connections. If too large concurrency leads to an increase of response time, you can increase the capacity by adding TiDB nodes.
407
415
416
+
#### How to view the creation time of a table?
417
+
418
+
The `create_time` of tables in the `information_schema` is the creation time.
419
+
408
420
### Manage the TiKV server
409
421
410
422
#### What is the recommended number of replicas in the TiKV cluster? Is it better to keep the minimum number for high availability?
@@ -693,6 +705,14 @@ If the amount of data that needs to be deleted at a time is very large, this loo
693
705
- Currently Lightning is in development for distributed data import. It should be noted that the data import process does not perform a complete transaction process for performance reasons. Therefore, the ACID constraint of the data being imported during the import process cannot be guaranteed. The ACID constraint of the imported data can only be guaranteed after the entire import process ends. Therefore, the applicable scenarios mainly include importing new data (such as a new table or a new index) or the full backup and restoring (truncate the original table and then import data).
694
706
- Data loading in TiDB is related to the status of disks and the whole cluster. When loading data, pay attention to metrics like the disk usage rate of the host, TiClient Error, Backoff, Thread CPU and so on. You can analyze the bottlenecks using these metrics.
695
707
708
+
#### What should I do if it is slow to reclaim storage space after deleting data?
709
+
710
+
You can configure concurrent GC to increase the speed of reclaiming storage space. The default concurrency is 1, and you can modify it to at most 50% of the number of TiKV instances using the following command:
711
+
712
+
```
713
+
update mysql.tidb set VARIABLE_VALUE="3" where VARIABLE_NAME="tikv_gc_concurrency";
714
+
```
715
+
696
716
## SQL optimization
697
717
698
718
### TiDB execution plan description
@@ -727,6 +747,10 @@ Use `admin show ddl` to view the current job of adding an index.
727
747
728
748
Yes. TiDB uses the cost-based optimizer. The cost model and statistics are constantly optimized. Besides, TiDB also supports correlation algorithms like hash join and soft merge.
729
749
750
+
#### How to determine whether I need to execute `analyze` on a table?
751
+
752
+
View the `Healthy` field using `show stats_healthy` and generally you need to execute `analyze` on a table when the field value is smaller than 60.
0 commit comments