0

I'm developing web application using Hiberante ORM tool and MySql database and i'm trying to search data from multiple tables among 2 lacks of data its taking longer time to search data, so please any one suggest me to improve performance of search (using Hibernate ORM tool and MySql DB) or should i use any searching functionality for it.

Thanking You All

Amit Kammar
  • 29
  • 1
  • 8

2 Answers2

0

To start with, log the generated SQL queries using the option:

<property name="show_sql">true</property>

Viewing the SQL you can detect if there are unnecessary joins, or unnecessary loads data. Then, modify your mapping or the way that you build your queries.

Maybe, you'll face the classic N+1 query problem

Community
  • 1
  • 1
polypiel
  • 2,321
  • 1
  • 19
  • 27
0
  1. Add indexes;
  2. Replace FetchType.EAGER by FetchType.LAZY.
Dmytro Plekhotkin
  • 1,965
  • 2
  • 23
  • 47