Add indices for slightly better performance
With the linux kernel commits, this reduced the time to update commit tracked flags from >60s to 44s, but this requires further testing before committing to the indices.
This commit is contained in:
parent
523b82632f
commit
3bfeb89686
1 changed files with 6 additions and 0 deletions
|
|
@ -17,3 +17,9 @@ CREATE TABLE tracked_refs (
|
||||||
hash TEXT NOT NULL,
|
hash TEXT NOT NULL,
|
||||||
FOREIGN KEY (hash) REFERENCES commits (hash) ON DELETE CASCADE
|
FOREIGN KEY (hash) REFERENCES commits (hash) ON DELETE CASCADE
|
||||||
) STRICT;
|
) STRICT;
|
||||||
|
|
||||||
|
CREATE INDEX idx_commit_links_child_parent
|
||||||
|
ON commit_links(child, parent);
|
||||||
|
|
||||||
|
CREATE INDEX idx_commit_links_parent_child
|
||||||
|
ON commit_links(parent, child);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue