Stamatis>You are measuring the time from 1000 executions of the query so if
it is
11ms per query then it doesn't look so slow.

AFAIK PreparedStatement.execute with PostgreSQL over localhost takes
~50..100us.
So 11ms per query is noticeable.

Of course, it is worth trying prepared statements.

Stamatis>Apart from that, if something is slow the typical suggestion is
use a
Stamatis>profiler and let us know what we can do to improve.

That is true. I would suggest using JMH to avoid common pitfalls rather
than "public static void main(String[] args)"

Qen, there's already a benchmark for that:
https://github.com/apache/calcite/blob/master/ubenchmark/src/jmh/java/org/apache/calcite/benchmarks/StatementTest.java
Have you tried it?

Vladimir

Reply via email to