Liquibase reading from databasechangelog takes a long time

Is there any ways of speeding up the maven task for liquibase rollback and update operation?

I've got a about 280 changeset in the db now and when I do an update it takes a long time just to read from databasechangelog.

I'm using liquibase 2 and a lot of sql formatted files for changeset. Thanks

Edit : Adding more specific time frame on execution

INFO 11/16/12 10:46 AM:liquibase: Reading from databasechangelog
INFO 11/16/12 10:54 AM:liquibase: Successfully released change log lock

In this example it's running locally on a MBP (core i7 with 8 gig of ram)

Answers


I've noticed the same thing. When using it via Maven I see the below:

[INFO] Executing on Database: jdbc:postgresql://localhost/mydb
INFO 11/5/12 1:01 PM:liquibase: Successfully acquired change log lock
INFO 11/5/12 1:01 PM:liquibase: Reading from databasechangelog
INFO 11/5/12 1:01 PM:liquibase: Reading from databasechangelog
INFO 11/5/12 1:02 PM:liquibase: ChangeSet mydb/db.changelog-006.sql::55::ebridges ran successfully in 41ms
INFO 11/5/12 1:02 PM:liquibase: Successfully released change log lock
INFO 11/5/12 1:02 PM:liquibase: Successfully released change log lock

Note that overall, the run took two minutes to execute a single changeset which itself took only 41ms execution time. That is slow.


On my machine I replicated the problem and the main thread was stuck on the native method:

java.lang.Class.getGenericSignature()

This indicates the problem lies with the JDK implementation. Consider upgrading or switching implementations.


In my scenario, using loadData with a .csv file was the cause of liquibase taking a long time to execute (I'm using liquibase 2.0.5).

For instance, this is a changeset which causes liquibase to slow down:

<changeSet id="foo" author="bar">
    <comment>Baz</comment>
    <loadData encoding="UTF-8"
              separator=";"
              file="some-file.csv"
              tableName="TableName"/>
    <rollback>
        <sqlFile path="rollback.sql" relativeToChangelogFile="true" splitStatements="false" />
    </rollback>
</changeSet>

Need Your Help

PDO Query Database ODBC

php ms-access pdo odbc

I'm on my way learning about PDO from phpro.org, and a little bit confuse.