aboutsummaryrefslogtreecommitdiff
path: root/sqlinit.txt
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-09 19:07:28 -0400
committerFranklin Wei <me@fwei.tk>2018-07-09 19:07:28 -0400
commitab8d3d75ce0dbd2b328b0b40dcb4d1e5f9dc862d (patch)
tree1f8bbfaae0b7c86585e35292b8b5b01d0a648e1e /sqlinit.txt
parent5de9ff09f0a812e78681e8eb53b5c36844da1e58 (diff)
downloadcsaa-ab8d3d75ce0dbd2b328b0b40dcb4d1e5f9dc862d.zip
csaa-ab8d3d75ce0dbd2b328b0b40dcb4d1e5f9dc862d.tar.gz
csaa-ab8d3d75ce0dbd2b328b0b40dcb4d1e5f9dc862d.tar.bz2
csaa-ab8d3d75ce0dbd2b328b0b40dcb4d1e5f9dc862d.tar.xz
Optimize IOMT leaf lookup/encloser search
We now use three separate searches, which are O(log n) time each, whereas the OR'd together version would incur a O(n) scan of the entire leaves table.
Diffstat (limited to 'sqlinit.txt')
-rw-r--r--sqlinit.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/sqlinit.txt b/sqlinit.txt
index b8e34ec..484d49d 100644
--- a/sqlinit.txt
+++ b/sqlinit.txt
@@ -109,5 +109,6 @@ FOREIGN KEY (Version) REFERENCES Versions(Version)
CREATE INDEX Idx1 ON Versions(FileIdx, Version);
CREATE INDEX Idx2 ON FileLeaves(Idx, NextIdx);
-CREATE INDEX Idx3 ON ACLLeaves(FileIdx, LeafIdx);
-CREATE INDEX Idx4 ON ACLNodes(FileIdx, NodeIdx);
+CREATE INDEX Idx3 ON FileLeaves(NextIdx);
+CREATE INDEX Idx4 ON ACLLeaves(FileIdx, LeafIdx);
+CREATE INDEX Idx5 ON ACLNodes(FileIdx, NodeIdx);