#JPA Hibernate Slow database request

1 messages · Page 1 of 1 (latest)

steel trench
#

Request to the database (the object it fetches an information (refenced via primary key) to is about 40 tables in total) is very slow (something about 20 seconds lmao).
There is default JPA Repository used to fetch the data from DB.
Do someone know how is possible to optimize a request?

waxen waveBOT
#

<@&1004656351647117403> please have a look, thanks.

ionic coral
#

Do you know which portion is slow? Getting a connection, the query itself, processing theresponse, ... ?

steel trench
ionic coral
#

Measure and observe, don't guess.

steel trench
ionic coral
#

How so? There are plenty of ways to measure how much time was spent on network traffic, on the database, etc..

steel trench
grand coyote
#

Increase logging so that you can log the statement plus parameters and do an explain plan later on