Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)

like image 608
Sergio Avatar asked Jun 13 '12 12:06

Sergio


2 Answers

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.

like image 26
vlfig Avatar answered Sep 22 '22 22:09

vlfig


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.

like image 117
Edward Q. Bridges Avatar answered Sep 25 '22 22:09

Edward Q. Bridges