clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

Reduce the amount of inactive threads

Open konstantinosss opened this issue 1 year ago • 0 comments

Our application uses clickhouse-jdbc in sync mode (async=false). It periodically executes bulk inserts in its background thread. But clickhouse-jdbc creates a default thread pool with a fixed amount of threads: 2 * Runtime.getRuntime().availableProcessors() + 1 In our environment, we have a hundred "ClickHouseWorker-" threads that are always inactive. Is it possible to replace the default executor with a more tuned version? Like cached executor with limited queue. Or at least allow to configure the amount of threads of the current executor?

konstantinosss avatar Jan 30 '24 15:01 konstantinosss