lunedì 13 ottobre 2008

mysqldump singole insert

Le versioni più recenti di mysqldump creano una insert multipla per gruppi di insert simili. Ad esempio con mysqldump si ottiene:


INSERT INTO `events` VALUES (6582,11,'1223390359:164321',6285,'bla bla bla',10,'2008-10-07 16:39:21','bank_id=60702&charge_id=079208%409001914','BA8CF7E8-947D-11DD-8B00-488D047A8996',NULL,NULL,'079208@9001914'),(6583,11,'1223390362:164327',NULL,'bla bla bla',10,'2008-10-07 16:39:22','bank_id=60702&charge_id=079208%409001914','BB3FCB48-947D-11DD-9E00-488D047A8996',NULL,NULL,'079208@9001914'), ...

aggiungendo il parametro

--extended-insert=false si ottiene

INSERT INTO `events` VALUES (6582,11,'1223390359:164321',6285,'bla bla bla',10,'2008-10-07 16:39:21','bank_id=60702&charge_id=079208%409001914','BA8CF7E8-947D-11DD-8B00-488D047A8996',NULL,NULL,'079208@9001914');
INSERT INTO `events` VALUES (6583,11,'1223390362:164327',NULL,'bla bla bla',10,'2008-10-07 16:39:22','bank_id=60702&charge_id=079208%409001914','BB3FCB48-947D-11DD-9E00-488D047A8996',NULL,NULL,'079208@9001914');
INSERT INTO `events` VALUES (6584,11,'1223390943:167153',NULL,'bla bla bla',10,'2008-10-07 16:49:04','bank_id=60702&charge_id=079208%409001914','15DA559A-947F-11DD-B959-D093047A8996',NULL,NULL,'079208@9001914');

Nessun commento: