summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mandocdb.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-01-17 19:16:42 +0000
committerschwarze <schwarze@openbsd.org>2014-01-17 19:16:42 +0000
commite3d5e84896ef8c25e7002fd72ae3893cc63143f3 (patch)
tree34a8ed84befefc9a2dfddf036cc8f6a3108b68e4 /usr.bin/mandoc/mandocdb.c
parentDespite some experimenting, i'm unable to find any relevant effect of (diff)
downloadwireguard-openbsd-e3d5e84896ef8c25e7002fd72ae3893cc63143f3.tar.xz
wireguard-openbsd-e3d5e84896ef8c25e7002fd72ae3893cc63143f3.zip
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. Optimization found somewhere above the Southern Balochistan desert, near the Iran-Pakistan border. Committing from Melbourne, Victoria.
Diffstat (limited to 'usr.bin/mandoc/mandocdb.c')
-rw-r--r--usr.bin/mandoc/mandocdb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 42de78fd9b5..2c67696a3ba 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.65 2014/01/17 19:07:12 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.66 2014/01/17 19:16:42 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1906,16 +1906,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)) {