stablerange: add an sql index on subranges id too
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 21 Dec 2017 04:29:02 +0100
changeset 3356 24b72cbc486f
parent 3355 c261eece1eab
child 3357 6020f2c9dbd9
stablerange: add an sql index on subranges id too This should speed up query that find super ranges.
hgext3rd/evolve/stablerangecache.py
--- a/hgext3rd/evolve/stablerangecache.py	Thu Dec 21 04:14:05 2017 +0100
+++ b/hgext3rd/evolve/stablerangecache.py	Thu Dec 21 04:29:02 2017 +0100
@@ -94,6 +94,7 @@
                               FOREIGN KEY (subrev, subidx) REFERENCES range(rev, idx)
     );""",
     "CREATE INDEX subranges_index ON subranges (suprev, supidx);",
+    "CREATE INDEX superranges_index ON subranges (subrev, subidx);",
     "CREATE INDEX range_index ON range (rev, idx);",
 ]
 _newmeta = "INSERT INTO meta (schemaversion, tiprev, tipnode) VALUES (?,?,?);"