read heads in the order they can be connected (relational)
read heads and connect in a second loop (leveldb)