improve efficiency of inserting huge data into database