Re: Why executeQuery execute so slow

2020-05-21 Thread Djeng Qen
Thks,Got that. I have a mistake in understanding performance, Sorry for my unprofessional, benchmark & profiler is best. Qen Djeng 于2020年5月16日周六 下午11:04写道: > > > Why executeQuery execute so slow?, spend 11176ms on execute 1000s > executeQuery! > > > > Is the

Re: Why executeQuery execute so slow

2020-05-19 Thread Vladimir Sitnikov
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. Stam

Re: Why executeQuery execute so slow

2020-05-19 Thread Stamatis Zampetakis
know what we can do to improve. Best, Stamatis On Sat, May 16, 2020 at 6:35 PM Qen Djeng wrote: > > Why executeQuery execute so slow?, spend 11176ms on execute 1000s > executeQuery! > > Is there anything wrong in my code. > > public class Main { > public static c

Why executeQuery execute so slow

2020-05-16 Thread Qen Djeng
Why executeQuery execute so slow?, spend 11176ms on execute 1000s executeQuery! Is there anything wrong in my code. public class Main { public static class HrSchema { public final Employee[] emps = new Employee[] { new Employee() }; } public static void main(String[] args