1>Table with millions row and 100 columns I want to run a query which will return one row (and I need 3-4 column) from the table. Which of JDBC or Hibernate is a better option for this use case.
2>Also is there any risk of getting Out Of Memory if we use hibernate in this case. I do not have any idea about caching issues in hibernate and heard people get OOM.
3>Which of hibernate/JDBC will give faster result. As the time matters in my case.
By the way, see my blog entry on using Hibernate for OLAP style queries.