build_db.py: Improve density