We are facing problem with the recreation of existing indexes when hbm2ddl.auto is set to ‘update’.
We have tables with millions of data and it is dropping the existing indexes and creating again (which is taking too long to start the server).
Blockquote For example: I can see the following statements while server startup:
Hibernate: alter table order drop index UK_nv4v3d33juoq0x0iwtub87ftw
Hibernate: alter table order add constraint UK_nv4v3d33juoq0x0iwtub87ftw unique (order_id)
We are using Hibernate 5.3.7.Final. In hibernate config file ‘MySQL5Dialect’ dialect being used.
I m not sure if this is an issue? I am referring the link: https://forum.hibernate.org/viewtopic.php?t=928084
Not sure if it is logged anywhere.
Please confirm and if anybody can explain why it is happening.