Speed up loading by using SQL-based DataFrame creation instead of row-by-row