简体   繁体   中英

Java multi-threads connect to TDengine database issue

在此处输入图像描述 在此处输入图像描述 I use the code above to implement a concurrent query.

but in the taoslog.0 in TDengine database,I could see only two connections like below, why?

在此处输入图像描述

try with AtomicLong for startDate, endDate and cost_total and please feed back. tnx

because TDengine has a connection pool inside TDengine client.

hence the output you pasted here makes sense.

they use a common connection but will be splited into multi work in TDengine server side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM