mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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:
parent
fcaee28818
commit
b9690972d0
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue