jeudi 18 décembre 2014

Breaking a big insert query into smaller ones


I have the below INSERT query. It tries to insert over 50,000 rows and it fails because of logging. Is there a good way of splitting a query like this into batches of about 1000 or so with COMMIT statements so that it is not just one big statement?



INSERT INTO xxx (....) SELECT .... FROM xx




Aucun commentaire:

Enregistrer un commentaire