memoized columns function
only get columns once for each table