Hibernate version: 3.1.3
Hello all,
I realy need some help with a serious performance-problem:
A simple Query (see log)...
Code:
[2009-01-09 11:27:34,609][DEBUG][org.hibernate.jdbc.AbstractBatcher]about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
[2009-01-09 11:27:34,609][DEBUG][org.hibernate.SQL]select * from ( select this_.AA_KEY as AA1_1_0_, this_.VERS_NR as VERS2_1_0_, this_.NACHNAME as NACHNAME1_0_, this_.VORNAME as VORNAME1_0_, this_.GEBURTSDATUM as GEBURTSD5_1_0_, this_.KAT_STATUS as KAT6_1_0_, this_.KAT_BEZ as KAT7_1_0_, this_.NACHNAME_UPC as NACHNAME8_1_0_, this_.VORNAME_UPC as VORNAME9_1_0_, this_.VERTRAG_KEY as VERTRAG10_1_0_ from aa.PERSON_V this_ where this_.NACHNAME_UPC like ? and this_.VORNAME_UPC like ? order by this_.KAT_STATUS asc, this_.KAT_BEZ asc ) where rownum <= ?
Hibernate: select * from ( select this_.AA_KEY as AA1_1_0_, this_.VERS_NR as VERS2_1_0_, this_.NACHNAME as NACHNAME1_0_, this_.VORNAME as VORNAME1_0_, this_.GEBURTSDATUM as GEBURTSD5_1_0_, this_.KAT_STATUS as KAT6_1_0_, this_.KAT_BEZ as KAT7_1_0_, this_.NACHNAME_UPC as NACHNAME8_1_0_, this_.VORNAME_UPC as VORNAME9_1_0_, this_.VERTRAG_KEY as VERTRAG10_1_0_ from aa.PERSON_V this_ where this_.NACHNAME_UPC like ? and this_.VORNAME_UPC like ? order by this_.KAT_STATUS asc, this_.KAT_BEZ asc ) where rownum <= ?
[2009-01-09 11:27:34,619][DEBUG][org.hibernate.jdbc.AbstractBatcher]preparing statement
[2009-01-09 11:27:34,629][DEBUG][org.hibernate.type.StringType]binding 'DOE' to parameter: 1
[2009-01-09 11:27:34,629][DEBUG][org.hibernate.type.StringType]binding 'JOHN' to parameter: 2
[2009-01-09 11:27:43,552][DEBUG][org.hibernate.jdbc.AbstractBatcher]about to open ResultSet (open ResultSets: 0, globally: 0)
...is taking ~ 9 sec. when it is performed by Hibernate ([2009-01-09 11:27:34,629] to [2009-01-09 11:27:43,552]).
When I do the same query in PL/SQL-Developer, it only takes a max of 1.5 sec.!??
Im not taking about the performance of the entire "list()"-method. Just the query seems to take that long. Or isn't Hibernate debugging something out, that happens between the query and "about to open ResultSet"!??
Thank you very much for any hint!
Best regards
Stephan