Well... I figured out that we have some problems concerning performance when using "ORDER BY" in complex select statements. I found a way to optimize the performance by playing around with the query that was generated by Hibernate and by reading the MySQL documentation. Unfortunately I need to modify the select statment by changing it from "select table_.property1, ... ORDER BY table_1.property1" to "select STRAIGHT_JOIN table_.property1, ... ORDER BY table_1.property1". I haven't found a way of modifying the statement before it gets executed or of configuring Hibernate. I guess optimizing your SQL statements is a common task and I would like to know if there is a way of direct support by Hibernate.
I hope this clarifies my problem.
Thanks,
Christopher
|