summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-18 08:21:03 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-18 08:21:03 +0000
commit8fa1c0838ddbc90c42f2365c082d535ba0f9266a (patch)
tree2154c58efb4b09de749b79a258a5667de12ce832 /mandocdb.c
parentc5d06cf382ff07880220d57e12e1c2e5b843e701 (diff)
downloadmandoc-8fa1c0838ddbc90c42f2365c082d535ba0f9266a.tar.gz
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.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mandocdb.c b/mandocdb.c
index cd02b2b5..4400f2aa 100644
--- a/mandocdb.c
+++ b/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)) {