Skip to content

Commit

Permalink
*: address github issues (#11265) (#11413)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Nov 23, 2022
1 parent ebbdb75 commit 6bfcb3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions faq/sql-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ In the following statement, the order of column `a` is guaranteed, but the order
3 rows in set (0.00 sec)
```

In TiDB, you can also use the system variable [`tidb_enable_ordered_result_mode`](/system-variables.md#tidb_enable_ordered_result_mode) to sort the final output result automatically.

## Does TiDB support `SELECT FOR UPDATE`?

Yes. When using pessimistic locking (the default since TiDB v3.0) the `SELECT FOR UPDATE` execution behaves similar to MySQL.
Expand Down Expand Up @@ -347,13 +349,10 @@ To learn the scenarios that cause hotspots, refer to [common hotpots](/troublesh
- The [`AUTO_RANDOM`](/troubleshoot-hot-spot-issues.md#handle-auto-increment-primary-key-hotspot-tables-using-auto_random) attribute, which helps resolve hotspots brought by auto-increment primary keys.
- [Coprocessor Cache](/coprocessor-cache.md), for read hotspots on small tables.
- [Load Base Split](/configure-load-base-split.md), for hotspots caused by unbalanced access between Regions, such as full table scans for small tables.
- [Cached tables](/cached-tables.md), for frequently accessed but rarely updated small hotspot tables.
If you have a performance issue caused by hotspot, refer to [Troubleshoot Hotspot Issues](/troubleshoot-hot-spot-issues.md) to get it resolved.
### How to scatter the hotspots?
In TiDB, data is divided into Regions for management. Generally, the TiDB hotspot means the Read/Write hotspot in a Region. In TiDB, for the table whose primary key (PK) is not an integer or which has no PK, you can properly break Regions by configuring `SHARD_ROW_ID_BITS` to scatter the Region hotspots. For details, see the introduction of `SHARD_ROW_ID_BITS` in [`SHARD_ROW_ID_BITS`](/shard-row-id-bits.md).
### Tune TiKV performance
See [Tune TiKV Thread Performance](/tune-tikv-thread-performance.md) and [Tune TiKV Memory Performance](/tune-tikv-memory-performance.md).
1 change: 1 addition & 0 deletions mysql-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ In addition, TiDB does not support the MySQL replication protocol, but provides
+ `OPTIMIZE TABLE` syntax
+ `HANDLER` statement
+ `CREATE TABLESPACE` statement
+ "Session Tracker: Add GTIDs context to the OK packet"

## Features that are different from MySQL

Expand Down

0 comments on commit 6bfcb3d

Please sign in to comment.