Had been running with 3.2.5 version of hibernate for a while, and finally got around to trying to upgrade to the latest version. We're now noticing a performance regression against some of our larger datasets, when doing the equivalent of the following:
Code:
Query q = session.createQuery("select t.id from OurClass t where t.attributeId = ?");
q.setParameter(0, attributeId);
q.list();
Testing against these larger datasets, q.list() may return a list of approximately 4 million ids. In 3.2.5, this query took around 5 seconds on average, but with 3.6.0 and 3.6.1, we're seeing times around 7 seconds. Tested with 3.5.6, and that seems to have the ~5 second runtime, so appears that something in 3.6.0 is causing the slowdown. All versions are generating and running the same database query. My initial profiling attempts haven't gotten very far yet. What's the best way to go about figuring out what's going on here?
-j