reduce number of mysql connections used during data upload