Use a single transaction to write dummy data

This is immensely faster when using InnoDB since we don't need to sync
after each and every INSERT statement.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Dan McGee 2011-03-01 09:58:09 -06:00 committed by Lukas Fleischer
parent fcaee28818
commit b9690972d0

View file

@ -54,6 +54,7 @@ if len(sys.argv) != 2:
# Just let python throw the errors if any happen
#
out = open(sys.argv[1], "w")
out.write("BEGIN;\n")
# make sure the seed file exists
#
@ -313,6 +314,7 @@ for p in seen_pkgs.keys():
# close output file
#
out.write("COMMIT;\n")
out.write("\n")
out.close()