Skip to content

Commit 9c666aa

Browse files
authored
FAQ: add some items (pingcap#377)
Via: pingcap/docs-cn#587
1 parent e83e1d3 commit 9c666aa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

FAQ.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ Yes. But it differs from MySQL in syntax. As a distributed database, TiDB uses t
7777

7878
The character sets of TiDB use UTF-8 by default and currently only support UTF-8. The string of TiDB uses the memcomparable format.
7979

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+
8088
### TiDB techniques
8189

8290
#### TiKV for data storage
@@ -405,6 +413,10 @@ In the communication process between the TiDB server and the TiKV server, the `S
405413
406414
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.
407415
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+
408420
### Manage the TiKV server
409421
410422
#### 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
693705
- 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).
694706
- 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.
695707

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+
696716
## SQL optimization
697717

698718
### TiDB execution plan description
@@ -727,6 +747,10 @@ Use `admin show ddl` to view the current job of adding an index.
727747

728748
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.
729749

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.
753+
730754
## Database optimization
731755

732756
### TiDB

0 commit comments

Comments
 (0)