trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.49k stars 3.02k forks source link

JDBC Driver Performance issues #8713

Open kqkdChen opened 3 years ago

kqkdChen commented 3 years ago

Why is the query performance of trino jdbc driver not as good as trino cli? The same SQL statement to query mysql: trino cli: 150ms, jdbc driver: takes about 400ms performance is more than twice as bad

image

I can make sure that there is no problem with my jdbc configuration, and the connection pool is not the key to affecting performance. Then the problem can only be caused by the execution of EXECUTE statement5 by trino. Can you provide your performance test results? I want to know the jdbc driver Why is it so slow?

Please note that both jdbc and cli are local, and there is no influence of network io trino version: 358 jdbc version: 358 datasource-pool: druid-1.1.23

hashhar commented 9 months ago

the cli buffers results using a background thread so it doesn't wait for existing "page" of results to be processed before downloading the next page.

hashhar commented 9 months ago

actually nevermind. JDBC does have the bufferring too.

zengbotang commented 2 weeks ago

I also found that jdbc is much slower than cli. Is there any solution?