# Concurrency

+ When system resources are idle, setting higher concurrency to make full use of resources can improve overall performance, but higher concurrency often consumes more system resources, which can reduce overall performance when resources are tight


![left](./student-guide/diagram/06-concurrency-01-01.png)
------------------------------------------------------------
Concurrency
- Basic principles
  - When system resources are idle, setting higher concurrency allows resources to be fully utilized can improve overall performance. However, higher concurrency often consumes more system resources, and reduces overall performance when resources are tight

- tidb_distsql_scan_concurrency 
  - Control the concurrency of TableScan and IndexScan operators

- tidb_index_lookup_concurrency
  - Control the concurrency of the IndexLookup operator

- tidb_build_stats_concurrency
  - Control the concurrency of the Analyze execution, which may affect the delay of online business

- tidb_hash_join_concurrency
  - Control the concurrency of the HashJoin operator

- tidb_index_lookup_join_concurrency
  - Control the concurrency of the IndexLookupJoin operator

- tidb_ddl_reorg_worker_cnt
  - Control the concurrency of DDL plus index
