Hibernate Search poor performance when calling FullTextQueryImpl.getResultList() -
I am developing a web app using Hibernate Search 4.4.
I'm having a performance issue while calling me getResultList () 's full text .
The generated query is implemented in approximately 30 milliseconds, but takes approximately 1 second to complete the entire method.
The query will return a small set; About 15 items.
Does anyone have any information about what might be the reason for this poor performance or how it can be improved or corrected.
If you need any other information, please leave a comment to add it.
Thank you in advance
From its description it looks like the Lucene query is fast , But the database load is slow.
Fulltextclaim normally performs two steps: - Perform Lucene Query - Load Results from the Database
> Unless you The estimates are not used: In that case the results are loaded from the index and you avoid loading from the database. So you can avoid killing the database completely, or at least to confirm that the database is loading, it is slow to correct.
If it is confirmed, then you will need to improve the loading performance from the database; You should enable SQL logging from the Hibernant ORM to see if the generated queries are unnecessarily complex, for example, too many links in the loaded unit can be marked as curious loading? Or maybe what type of inquiry you need, it can help with an index on the database schema.
Alternatively you can see in enabling second-level caching, in these cases it is specifically several "one" side relationship, where "one" in favor There are only a limited amount of different institutions in the database.
A suggestion on the performance of the Hibernate ORM general purpose: Try to use the latest version may benefit from exceptional performance improvements in the latest versions.
Comments
Post a Comment