Skip to content

Commit

Permalink
Add multithreading notes to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Oct 16, 2019
1 parent d6bf0e3 commit 7b9e469
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,17 @@ DDL queries can be executed in the same way SELECT queries are executed:
[]
Asynchronous behavior
---------------------
Async and multithreading
------------------------

Every ClickHouse query is assigned an identifier to enable request execution
tracking. However, ClickHouse native protocol is synchronous: all incoming
queries are executed consecutively. Clickhouse-driver does not yet implement
a connection pool. To utilize ClickHouse's asynchronous capability you should
either use multiple Client instances or implement a queue.
a connection pool.

To utilize ClickHouse's asynchronous capability you should either use multiple
Client instances or implement a queue.

The same thing is applied to multithreading. Queries from different threads
can't use one Client instance with single connection. You should use different
clients for different threads.

0 comments on commit 7b9e469

Please sign in to comment.