In Oracle adding Index for Foreign Key columns is important for performance reasons. And also if you are using transactions, It is important to create index for FK columns. With out index your application may experience many deadlock problems.
These indexes are automatically generated for MySQL by Hibernate (In MySQL Index for FK columns is mandatory). But these indices are not generated for Oracle by Hibernate.
So we need to explicitly mention indexes in hibernate mapping tables.
For hibernate <list> </list> objects we can use <database-object> tag for explicitly mention the create/drop index.
<hibernate-mapping>
……
……
<database-object>
<create>CREATE INDEX ACCOUNT_IDX ON Person(ACCOUNTID)</create>
<drop>DROP INDEX ACCOUNT_IDX ON Person</drop>
<dialect-scope name=”org.hibernate.dialect.Oracle10gDialect”></dialect-scope>
</database-object>
<hibernate-mapping>