Hi Hibernate Experts,
Please help resolve this performance issue. Scenario is detailed below:
Test case #1. Search (exact match) - PO Number EQUALS XYZ (1.8 s)
Test case #2. Search (like operator) - PO Number STARTS WITH XYZ (6.5 s)
The search results are exactly the same. The DB queries take < 50ms, when run in the Query Analyser Tool (SQL Server Management Studio). We have confirmed that the SQL queries are not slow.
The profiler (Yourkit Java Profiler) screenshots show the hibernate.criteriaImpl.list() consuming 1.8 s and 6.5 s for the two tests respectively.
Why is hibernate consuming more time, when the input (PO Number) and output (Search results) are exactly the same?
Due to this our performance SLA = 5 s is getting violated.
Please advise.
Tech Stack:
Hibernate 3.6.10
Liferay 6.2
Microsoft SQL Server (Microsoft SQL Azure (RTM) - 12.0.2000.8)
Driver: Microsoft SQL Server JDBC driver
!