HomeSoftware Heritage

pg: Rewrite _origin_query to force the query planner to filter on URLs before…

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

Description

pg: Rewrite _origin_query to force the query planner to filter on URLs before filtering on visits.

URL filters usually have a few matches and use the index; whereas filtering
on visits requires to scan the entire origin table first.

This makes the query considerably faster.

Credit for the idea goes to @olasd.

Commit No Longer Exists

This commit no longer exists in the repository.