added an abstraction DBIterator for large queries