Hi all, .I am working with performance issues in hibernate.when i am using hql i cannot force hints for my query.for example Query qry = session.createQuery(" select /*+index(p p_nm)*/ p.name from Person p "); when i am running this i am getting parser exception. But i need to use hints for my query.Can i use createSQLQuery() method for this purpose.for example Query qry = session.createSQLQuery(" select /*+index(p p_nm)*/ p.name from Person p "); By using createSQLQuery() will there be any performance degradation. anyone please help me.
posted 9 years ago
A native SQL query will go straight to the database, so you can put there any SQL syntax that your database understands.