From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s0I8L3Yc018484 for ; Sat, 18 Jan 2014 03:21:03 -0500 (EST) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s0I8L3or019788; Sat, 18 Jan 2014 03:21:03 -0500 (EST) Date: Sat, 18 Jan 2014 03:21:03 -0500 (EST) Message-Id: <201401180821.s0I8L3or019788@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Drop the AUTOINCREMENT PRIMARY KEYs from the mlinks and keys X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Drop the AUTOINCREMENT PRIMARY KEYs from the mlinks and keys tables. They are completely unused, and i cannot imagine what they *could* ever be used for; but apparently, they are expensive to generate. Standard DB build time goes down by 10%, now at 1.9x of makewhatis. Standard DB size goes down by 4%, now at 11x of makewhatis. DB build time with -Q goes down by 15%, now at 0.28x of makewhatis. DB size with -Q goes down by 3%, now at 3.35x of makewhatis. Modified Files: -------------- mdocml: mandocdb.c Revision Data ------------- Index: mandocdb.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v retrieving revision 1.108 retrieving revision 1.109 diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.108 -r1.109 --- mandocdb.c +++ mandocdb.c @@ -1914,16 +1914,14 @@ dbopen(int real) " \"arch\" TEXT NOT NULL,\n" " \"name\" TEXT NOT NULL,\n" " \"pageid\" INTEGER NOT NULL REFERENCES mpages(id) " - "ON DELETE CASCADE,\n" - " \"id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL\n" + "ON DELETE CASCADE\n" ");\n" "\n" "CREATE TABLE \"keys\" (\n" " \"bits\" INTEGER NOT NULL,\n" " \"key\" TEXT NOT NULL,\n" " \"pageid\" INTEGER NOT NULL REFERENCES mpages(id) " - "ON DELETE CASCADE,\n" - " \"id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL\n" + "ON DELETE CASCADE\n" ");\n"; if (SQLITE_OK != sqlite3_exec(db, sql, NULL, NULL, NULL)) { -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv