We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Why are queries executed in java so much slower than vsql? — Vertica Forum

Why are queries executed in java so much slower than vsql?

From vsql with timings turned on (\timing) the simple query of “select 1+1” returns in 8.6ms. dbadmin=> \timing Timing is on. dbadmin=> select 1+1; ?column? ---------- 2 (1 row) Time: First fetch (1 row): 8.657 ms. All rows formatted: 8.705 ms If I write a java app to execute the same query, it takes 7 times longer. Why? dstott@dast:~/testvertica$ java -cp vertica-jdk5-6.1.3-0.jar:. RunVerticaQuery jdbc:vertica://localhost:5433/vmartdb dbadmin popchart "select 1+1" Response: 38ms Metadata: 0ms Read 1 rows in 23ms Total Duration: 61ms dstott@dast:~/testvertica$ java -cp vertica-jdk5-6.1.3-0.jar:. RunVerticaQuery jdbc:vertica://localhost:5433/vmartdb dbadmin popchart "select 1+1" Response: 45ms Metadata: 0ms Read 1 rows in 25ms Total Duration: 71ms dstott@dast:~/testvertica$ java -cp vertica-jdk5-6.1.3-0.jar:. RunVerticaQuery jdbc:vertica://localhost:5433/vmartdb dbadmin popchart "select 1+1" Response: 39ms Metadata: 0ms Read 1 rows in 23ms Total Duration: 62ms

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file