What may help you to improve startup time is dynamic-insert=true and dynamic-update=true in your class mappings. The problem is that these settings can not be specified globally and as well are not inherited, so they shall be specified individually on each class, subclass and joined-subclass element in your mappings.
In the presence of these settings Hibernate does not try to generate and cache for future use insert and update statements for each and every table in mapping right on startup, but does it only when statement has to be used (in which case only affected columns are included in the statement). Some times it is good for performance, sometimes -bad, but anyhow for big schemas startup time is be greatly reduced.
Another possible optization is to mark all immutable classes (if any) as such (mutable="false"). "Immutable" in this context means that your application never update or delete objects of this classes in/from DB.
Regards,
Oleksandr



Reply With Quote