HomeSoftware Heritage

storage.db: Improve content range queries to actually finish

Description

storage.db: Improve content range queries to actually finish

In production, the previous query version takes too long to finish. This ended
up with timeouts (with query still running in the pg backend). Accumulating
similar new queries.

Counter-intuitively, specifying twice the range query to use (both in
content_mimetype and content_fossology_license), the execution now returns
immediately.

Close T1788