Table.exists() very slow in Postgres Environments with a lot of objects #1701
What version of Flyway are you using?
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
What database are you using (type & version)?
What did you do?
Run migrations on a database with many objects.
What did you expect to see?
I expected a negligible overhead for the calls to Table.exists()
What did you see instead?
A single call to Table.exists() - or more precisely PostgreSQLTable.doExists() - has a significant overhead.
On a database with over 500.000 Objects a single call can take more than 250ms.
When calling Flyway.migrate() the method is called about 8 times and then 3 times per Script.
Of course this is a problem with Postgres in the first place, but unfortunately leads to difficulties when doing migrations with Flyway .
The text was updated successfully, but these errors were encountered:
The code for