I have a really simple query to select all rows from a table. In hibernate it always takes about 17-18 seconds. I specified, show_sql
to be true. I copied the sql command directly to mysql and it took 0.00022 seconds...
this is the query:
SELECT
organizati0_.id AS id1_5_,
organizati0_.adminList AS adminLis2_5_,
organizati0_.demoAccount AS demoAcco3_5_,
organizati0_.disabled AS disabled4_5_,
organizati0_.enduserCredits AS enduserC5_5_,
organizati0_.name AS name6_5_,
organizati0_.pushNotificationRoom AS pushNoti7_5_,
organizati0_.totalLicenses AS totalLic8_5_,
organizati0_.usedLicenses AS usedLice9_5_
FROM
organization organizati0_
this is the code for the query:
Session session = ThreadSessionHolder.getThreadSession();
Query query = session.createQuery("from Organization ");
List list = query.list();
return list;
any ideas? this is driving me nuts