Uploaded image for project: 'Hibernate ORM'
  1. HHH-11023

Startup performance regression : schema update/validate

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      When using schema update/validate, Hibernate needs to access the current state of the schema on the database server.

      In 4.3, Hibernate was executing "SHOW FULL TABLES and SHOW FULL COLUMNS with LIKE '%' " in order to discover the complete database tables columns. Starting in 5.0 however Hibernate is no longer using "%" but it is giving as parameter all individual columns from every table it discovered. The amount of queries to the database during startup increased from ~200 to ~2700. Due to the constant load to which the server is exposed from other applications, each query takes 100-150ms, thus increasing the startup time of our application from 10-20 seconds to 4-5 minutes.

      The number of queries can be easily seen by enabling MySQL query log.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: