Improve DBFormatter performance by using izip
Restructure loop in formatCursor