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
0