# dropAll really slow Oracle

**URL:** https://forum.liquibase.org/t/dropall-really-slow-oracle/1265
**Category:** General Discussion
**Created:** [May 9, 2011, 6:34pm UTC](https://forum.liquibase.org/t/dropall-really-slow-oracle/1265 "2011-05-09T18:34:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![henning\_juva](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@henning\_juva](https://forum.liquibase.org/u/henning_juva)
#### Post date: [May 9, 2011, 6:34pm UTC](https://forum.liquibase.org/t/dropall-really-slow-oracle/1265/1 "2011-05-09T18:34:00Z")

</div>

Is there a known reason why dropAll is so slow on Oracle (or in general)?  
  
As an example it takes anything from 30 seconds to 5 minutes for the dropAll to complete on a smallish database. No more than 50 objects in total to drop. Some (3-4) tables are fairly big in terms of rows (2-6 million).  
  
Any debugging/tracing I can turn on to help troubleshoot the issue?

---

<div class="post-metadata">

### Author: ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)
#### Post date: [May 9, 2011, 6:34pm UTC](https://forum.liquibase.org/t/dropall-really-slow-oracle/1265/2 "2011-05-09T18:34:00Z")

</div>

You can pass the logLevel=DEBUG flag, but I’m not sure if there is a lot. I wouldn’t expect it to be based on table size.&nbsp;

The best option woudl be to run liquibase through a profiler like is available in netbeans.

Nathan

---

<div class="post-metadata">

### Author: ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)
#### Post date: [May 9, 2011, 6:34pm UTC](https://forum.liquibase.org/t/dropall-really-slow-oracle/1265/3 "2011-05-09T18:34:00Z")

</div>

It looks like the slow part is this call in AbstractDatabase.dropDatabaseObjects:

1. DatabaseSnapshot snapshot = DatabaseSnapshotGeneratorFactory.getInstance().createSnapshot(this, schema, new HashSet());

Specifically, reading the PKs and columns takes a long time:

1. 2012-05-05 23:58:26,927 [main] DEBUG liquibase - Reading tables for EXAMPLE @ jdbc:oracle:thin:@localhost:1521:bla ...
2. 2012-05-05 23:58:26,972 [main] DEBUG liquibase - Reading views for EXAMPLE @ jdbc:oracle:thin:@localhost:1521:bla ...
3. 2012-05-05 23:58:27,020 [main] DEBUG liquibase - Reading foreign keys for EXAMPLE @ jdbc:oracle:thin:@localhost:1521:bla ...
4. 2012-05-05 23:59:17,114 [main] DEBUG liquibase - Reading unique constraints for EXAMPLE @ jdbc:oracle:thin:@localhost:1521:bla ...
5. 2012-05-05 23:59:17,375 [main] DEBUG liquibase - Reading indexes for EXAMPLE @ jdbc:oracle:thin:@localhost:1521:bla ...
6. 2012-05-05 23:59:17,545 [main] DEBUG liquibase - Reading sequences for EXAMPLE @ jdbc:oracle:thin:@localhost:1521:bla ...

From this sample log, reading the PKs and columns took 50 sec ☹

Any ideas whether this is a Liquibase issue or an Oracle driver/db issue?

Nikita

---

<div class="post-metadata">

### Author: ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)
#### Post date: [May 9, 2011, 6:34pm UTC](https://forum.liquibase.org/t/dropall-really-slow-oracle/1265/4 "2011-05-09T18:34:00Z")

</div>

Purge your recycle bin.&nbsp; Liquibase cannot tell the difference between a dropped object and one that has not been dropped thus it try to follow constraints for objects that have already been dropped.&nbsp; This problem gradually causes the process to run slower and slower based on the number of dropped objects in the recycle bin.
