aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit95092eff338c9083cb43747247d5a17a29e9b2b4 (patch)
tree3ef1419b7d4c648fb30e0a57d3ad1f6ab23e2145 /mandocdb.c
parent679174de76fe7ef8fe49522444d477576dbc418a (diff)
downloadmandoc-95092eff338c9083cb43747247d5a17a29e9b2b4.tar.gz
mandoc-95092eff338c9083cb43747247d5a17a29e9b2b4.tar.zst
mandoc-95092eff338c9083cb43747247d5a17a29e9b2b4.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.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mandocdb.c b/mandocdb.c
index f24862d7..3596a4e9 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.108 2014/01/18 08:19:18 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.109 2014/01/18 08:21:03 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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)) {