HomeSoftware Heritage

origin_visit_get_latest: Materialize subquery on 'origin' table.
600e87fb2351Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

origin_visit_get_latest: Materialize subquery on 'origin' table.

postgresql's query planner does not understand the origin is unique, so it performs
a partial index scan on origin_visit_pkey, which is inefficient on origins with
many visits.

This commit itself is not enough to make it use the proper index,
but provides this necessary change that will be used by a future commit.

Details

Provenance
vlorentzAuthored on Mar 11 2022, 1:36 PM
vlorentzPushed on Mar 11 2022, 1:36 PM
Parents
R65:b0cdab58b71b: postgresql: Increase timeouts that often fail
Branches
Unknown
Tags
Unknown
References
tag: phabricator/diff/26531, tag: phabricator/base/26533, tag: phabricator/base/26532

Event Timeline