fix #416. Improve the time it takes to drop an entire database