-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bad performance when use jdbc #1138
Comments
JDK 17.0.5 |
@zhicwu 还有个问题,老哥,你是中国人吗,看名字好像是拼音。为啥所有的提交和issue都是你在处理,这个项目没有其他人了吗,那些member去哪了😂,项目版本好像已经很久没有更新了 |
Could you check batch insert examples at here? In general, you need to tell the driver or at least give it clues to figure out table structure, so that it can use binary stream for batch inserting, instead of constructing a large SQL query. Apart from that, a few more things you can try:
If performance is mission critical, you may also use Java client - see more information at #928 (expand
I took over maintenance for the exact same reason :) The latest code is on |
I have seen the examples and used
This way exactly works well! |
Hi, I found the performance is poor when batch insert to clickhouse-server, here is the demo to reproduce.
I log the time and found that the largest proportion is when 'setting param' , the log is like this
I copy org.springframework.jdbc.core.JdbcTemplate to my project to add some log, other than that, I haven't changed anything.
You can see the log code at here and I used stopwatch to record time.
As you can see, there just 20ms when the sql actually insert to the server but about 1000+ms when prepare the sql.
1 second and more for 1000 data is too slow. But I just use the basic jdbc api so I don't know how to improve the performance now😳
The text was updated successfully, but these errors were encountered: