Jason Long <mailing.lists@xxxxxxxxxxxxxxxx> writes: > I recently upgraded to JBoss AS 6.0.0.Final which includes a newer > version of Hibernate. > Previously the Postgres dialect was using a comma, but now is is using > cross join. > With the cross join this query never completes. With the comma the > query is identical to what was there before and takes less than 300 ms. Those should be semantically equivalent AFAICS. Do you maybe have join_collapse_limit set to a smaller-than-default value? If not, are any of those tables really join views? Please see http://wiki.postgresql.org/wiki/SlowQueryQuestions if you need further help, because there's not enough information here to do more than guess wildly. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general