DEV Community

Leandro Roura Sixto
Leandro Roura Sixto

Posted on

Complex SQL query takes 2 seconds on Database, but 80 seconds in Java Application

I have a complex SQL query that joins several tables and calls some function for some data calculation. Even, I've turned it into a View in order to build a comfortable JPA implementation to obtain the data. The base SQL query takes 2 seconds when it runs on the Database…

Top comments (0)