vsql slower than Squirrel SQL

585 Views Asked by At

I'm executing a SQL like below in a Vertica database (running on a single node) on a table which has about 258 million rows.

I get the output in about 17 secs in SQuirrel SQL, but it takes several minutes to get the output of the same query in vsql in command-line mode.

select avg(item_chr_val_id) from table1

Any idea, what could be the reason for this slowness just in vsql?

2

There are 2 best solutions below

1
On

What versions of Vertica ande the JDBC jar are you using? I wonder if somehow you're lucking into the right execution plan with JDBC. Though it seems weird and unlikely.

0
On

The delay is becouse of the formting operation. In you SQuirrel SQL i maybe have a limit of 100 or 1000 as your first formated data !! In vsql the default value is 1000 but you can chenge !! To see the execution time one option is to do as follows

\timing
\o \dev\null
select avg(item_chr_val_id) from table1;

This might get an acutare result as the data will not be formated on the screan