HomeSoftware Heritage

Migrate away from temporary tables for read queries
a16796047b33Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Migrate away from temporary tables for read queries

Summary:
To do so, we import a function from a recent version of psycopg2,
execute_values, which can execute queries efficiently with a list of values.

We also scale the cursor back from having things in SQL functions towards having
things inside the db.py database "backend". This will make it easier to iterate,
as we won't have to deploy function changes to twenty different databases.

After these changes, testing the web UI on a physical replica works.

Close T1073

Test Plan:
Local integration tests are happy; Navigating the frontend backed by
a physical replica seems to be okay now.

Reviewers: Reviewers!

Maniphest Tasks: T1073

Differential Revision: https://forge.softwareheritage.org/D340

Details

Provenance
olasdAuthored on May 31 2018, 5:06 PM
anlambertPushed on Aug 2 2018, 3:10 PM
Differential Revision
D340: Migrate away from temporary tables for read queries

Commit No Longer Exists

This commit no longer exists in the repository.