HomeSoftware Heritage

origin_visit_get_latest: Order by visit id instead of date
ccde097533cdUnpublished

Unpublished Commit · Learn More

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

Description

origin_visit_get_latest: Order by visit id instead of date

This allows both the postgresql and cassandra backends to make efficient
queries by using an index (resp. clustering key) instead of scanning
all visits of the given origin then sorting by date.

This does not affect the results for the last majority of cases,
as ids are always in increasing chronological, unless an origin was
re-loaded from an old archive.

Details

Provenance
vlorentzAuthored on Mar 11 2022, 1:38 PM
vlorentzPushed on Mar 11 2022, 1:43 PM
Parents
R65:600e87fb2351: origin_visit_get_latest: Materialize subquery on 'origin' table.
Branches
Unknown
Tags
Unknown
References
tag: phabricator/diff/26533, tag: phabricator/base/26567

Event Timeline