fixes performance issue building columns with large number of records