HomeSoftware Heritage

postgresql: ensure origin_visit(_status) queries use index

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

postgresql: ensure origin_visit(_status) queries use index

When using an inner join for the single origin value, instead of a
subquery, the query fails to use the (origin, visit) indexes and falls
back to fetching all the visits (or all the statuses) for the origin and
sorting them.

This breaks down for origins with a lot of visits, such as the ones that
are being used for end to end monitoring.

Using a subselect to generate a single origin id value ensures that the
queries can use the proper indexes.

Details

Provenance
olasdAuthored on Apr 12 2022, 1:53 PM
olasdPushed on Apr 12 2022, 2:32 PM
Differential Revision
D7554: postgresql: ensure origin_visit(_status) queries use index
Build Status
Buildable 28401
Build 44408: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.