From 2cc9562fd2ee8c57e835fdd5291184c830ef8e23 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 15 Dec 2012 22:44:06 +0100 Subject: Create database using a single transaction Takes the time required to do initial database creation down from 16 to 0.2 seconds on the Raspberry Pi. --- src/sql/sqlite/createTables.sql | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sql/sqlite/createTables.sql') diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql index 06dbd195..d845e842 100644 --- a/src/sql/sqlite/createTables.sql +++ b/src/sql/sqlite/createTables.sql @@ -18,6 +18,8 @@ -- along with The Mana Server. If not, see . -- +BEGIN; + ----------------------------------------------------------------------------- -- Tables ----------------------------------------------------------------------------- @@ -480,3 +482,5 @@ INSERT INTO mana_transaction_codes VALUES ( 51, 'Command RESTART_THIS', 'Com INSERT INTO mana_transaction_codes VALUES ( 52, 'Command RESTART_ALL', 'Commands' ); INSERT INTO mana_transaction_codes VALUES ( 53, 'Command ATTRIBUTE', 'Commands' ); INSERT INTO mana_transaction_codes VALUES ( 54, 'Command KICK', 'Commands' ); + +END; -- cgit v1.2.3-70-g09d2