Re: BUG #1410: Hibernate PerformanceTest is incredibly slow - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1410: Hibernate PerformanceTest is incredibly slow
Date
Msg-id 10273.1106266828@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1410: Hibernate PerformanceTest is incredibly slow  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-bugs
Oliver Jowett <oliver@opencloud.com> writes:
> If I patch Hibernate to not add a FK constraint at all, it runs
> substantially faster. It does not seem trivial to fix Hibernate to add
> an index in this case -- Hibernate wants to run "ALTER TABLE tablename
> <dialect specific sql>" to add a FK constraint, but we need to execute
> "ALTER TABLE tablename ADD CONSTRAINT ...; CREATE INDEX .... ON
> tablename ..." and the dialect code is not given "tablename".

> So to fix this properly needs some work on the Hibernate side.

That division of labor seems more than a tad brain-dead anyway;
who's to say that the appropriate dialect-specific command is an
ALTER TABLE at all?  It would be better if the dialect-specific
code were responsible for emitting the entire command --- in which
case it would have the tablename too and could do the Right Thing.

So I'd suggest filing a bug/enhancement request against Hibernate.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: BUG #1410: Hibernate PerformanceTest is incredibly slow
Next
From: "Jonathan Pool"
Date:
Subject: BUG #1425: False failure message on boot start