lix/src
Sergei Trofimovich 975b0b52e7 ca: add sqlite index on RealisationsRefs(realisationReference)
Without the change any CA deletion triggers linear scan on large
RealisationsRefs table:

    sqlite>.eqp full
    sqlite> delete from RealisationsRefs where realisationReference IN ( select id from Realisations where outputPath = 1234567890 );
    QUERY PLAN
    |--SCAN RealisationsRefs
    `--LIST SUBQUERY 1
       `--SEARCH Realisations USING COVERING INDEX IndexRealisationsRefsOnOutputPath (outputPath=?)

With the change it gets turned into a lookup:

    sqlite> CREATE INDEX IndexRealisationsRefsRealisationReference on RealisationsRefs(realisationReference);
    sqlite> delete from RealisationsRefs where realisationReference IN ( select id from Realisations where outputPath = 1234567890 );
    QUERY PLAN
    |--SEARCH RealisationsRefs USING INDEX IndexRealisationsRefsRealisationReference (realisationReference=?)
    `--LIST SUBQUERY 1
       `--SEARCH Realisations USING COVERING INDEX IndexRealisationsRefsOnOutputPath (outputPath=?)
2022-04-21 10:06:39 +02:00
..
build-remote Generalize DerivationType in preparation for impure derivations 2022-03-18 14:59:56 +00:00
libcmd Merge pull request #6128 from ncfavier/fix-completion 2022-04-19 13:45:33 +02:00
libexpr Merge pull request #6128 from ncfavier/fix-completion 2022-04-19 13:45:33 +02:00
libfetchers Avoid fmt when constructor already does it 2022-04-19 01:44:11 +00:00
libmain Avoid fmt when constructor already does it 2022-04-19 01:44:11 +00:00
libstore ca: add sqlite index on RealisationsRefs(realisationReference) 2022-04-21 10:06:39 +02:00
libutil Merge pull request #3720 from obsidiansystems/fix-url-format 2022-04-20 20:01:37 +02:00
nix Merge pull request #3720 from obsidiansystems/fix-url-format 2022-04-20 20:01:37 +02:00
nix-build Desugar StorePathWithOutputs in nix-build implementation 2022-03-11 20:50:52 +00:00
nix-channel Fix segfault in headerCallback() 2022-03-03 11:11:16 +01:00
nix-collect-garbage Deduplicate the Store downcasting with a template 2022-03-11 13:32:33 +00:00
nix-copy-closure copyPaths: Pass store by reference 2021-07-22 09:59:51 +02:00
nix-env Don't hide repeated values while generating manifest.nix 2022-03-22 13:18:56 +01:00
nix-instantiate Add EvalState::coerceToStorePath() helper 2022-03-02 23:58:58 +01:00
nix-store Deduplicate the Store downcasting with a template 2022-03-11 13:32:33 +00:00
resolve-system-dependencies Fix macOS build 2022-02-21 17:14:22 +01:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00