make tables get all data from sql in one chunk instead of row by row