Have you tried to enable hibernate show sql (hibernate.show_sql property) to see if the sql that is sent to the db is the same or similar ? Maybe if it's very different it can be the cause.
Another thing to check is if you correctly set the database connection pool and server threads.
thanks for your reply.
Yes, I enabled hibernate to show SQL, and they are really the same. I checked what is reaching DB too.
Server threads and pools are also well set, they have enough room to work.
I tried Wildfly-13 too (as it has a new Hibernate internally), but the result was the same.
Any other ideas that I can follow?
We recently migrated a big application from jboss5 to wildfly15 and had no problem with queries, I'm afraid I can't be of more help.
If the sql is the same and when you execute it with a sql client the query is fast then it must be something on the wildly side for sure...
Our case is more or less the same, a big app from jboss5 to wildfly13. We decided to use jee7 for now.
I saw something related to the the bufferSize used by datasource connections, but had no effect too. Something like jdbc:postgresql://127.0.0.1:<port>/<db_name>?sendBufferSize=524288.
Is possible to tell which DB ad OS you are using there?
We're using Linux Centos and Postgres.
Same DB and OS here.
Maybe differences related to versions, but same env.
How about JDK version. Which version are you using?
At the time of migration six months ago we were using jdk8, now jdk11.
Same JDK version here, too.
2 few more questions...
What was the PG version used by your old version software and what is the new one you using now?
How about DB size? Is it a big DB (more than 2TB) or not?
Thanks in advance.