From ee04c2725f0f8b163ae242935a2ca21dbcc17620 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 24 May 2021 14:40:37 +0200 Subject: Database: decrease DB size by using WITHOUT ROWID tables None of our tables are indexed by a INTEGER PRIMARY KEY, but most of them are by a (auth_name, code) primary key. Consequently they can benefit from being created as WITHOUT ROWID tables (https://sqlite.org/withoutrowid.html), which avoids an index to be created on the rowid we don't use. WITHOUT ROWID is a feature added in SQLite 3.8.2, so as our baseline is 3.11, we can use it. This decreases the DB size from 7,749,632 to 7,229,440 bytes, without any measurable consequence on performance. --- test/cli/testprojinfo_out.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 3482c90e..9f2fb22b 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -1557,7 +1557,7 @@ Testing projinfo --dump-db-structure | head -n 5 CREATE TABLE metadata( key TEXT NOT NULL PRIMARY KEY CHECK (length(key) >= 1), value TEXT NOT NULL -); +) WITHOUT ROWID; CREATE TABLE unit_of_measure( Testing projinfo --dump-db-structure --output-id HOBU:XXXX EPSG:4326 | tail -n 4 -- cgit v1.2.3