HomeSoftware Heritage

postgresql: Ensure a minimum limit for the snapshot branches query

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

Description

postgresql: Ensure a minimum limit for the snapshot branches query

With small limits (< 10), the snapshot branches query can degenerate into
using the deduplication index on snapshot_branch (name, target, target_type),
and the postgresql planner happily scans several hundred million rows.

So ensure a minimum limit value of 10 before executing the query for
optimal performances when a small branches_count value is provided
to the snapshot_get_branches method of the Storage interface.

Related to P966

Details

Provenance
anlambertAuthored on Mar 3 2021, 4:20 PM
anlambertPushed on Mar 3 2021, 6:37 PM
Differential Revision
D5191: postgresql: Ensure a minimum limit for the snapshot branches query
Build Status
Buildable 19666
Build 30516: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.