Page MenuHomeSoftware Heritage

Add date-based index to origin_visit
ClosedPublic

Authored by olasd on Tue, Sep 13, 4:07 PM.

Details

Summary

This will help queries retrieving origin_visits by date by avoiding
having to scan all visits for the origin and then sorting them.

Test Plan

We did it in prod™

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Only create index if not exists

Build is green

Patch application report for D8466 (id=30501)

Rebasing onto aa735cba51...

Current branch diff-target is up to date.
Changes applied before test
commit 1281ee7b7eeb4e05470edad1f7cd7b7eb2c7108c
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Sep 13 15:52:34 2022 +0200

    Add date-based index to origin_visit
    
    This will help queries retrieving origin_visits by date by avoiding
    having to scan all visits for the origin.

commit 0786ab17490233130ad2c0310ba14e0b7d56d8e9
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Sep 13 15:51:57 2022 +0200

    SQL upgrade scripts don't need to bump dbversion anymore

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1662/ for more details.

olasd requested review of this revision.Tue, Sep 13, 4:26 PM

Build was aborted

Patch application report for D8466 (id=30500)

Rebasing onto aa735cba51...

Current branch diff-target is up to date.
Changes applied before test
commit 7deca5730b4ac35866515b3aa6ab0e0761406ecb
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Sep 13 15:52:34 2022 +0200

    Add date-based index to origin_visit
    
    This will help queries retrieving origin_visits by date by avoiding
    having to scan all visits for the origin.

commit 0786ab17490233130ad2c0310ba14e0b7d56d8e9
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Sep 13 15:51:57 2022 +0200

    SQL upgrade scripts don't need to bump dbversion anymore

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1661/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1661/console

This revision is now accepted and ready to land.Wed, Sep 14, 12:30 PM

Build is green

Patch application report for D8466 (id=30828)

Rebasing onto aa735cba51...

Current branch diff-target is up to date.
Changes applied before test
commit 1281ee7b7eeb4e05470edad1f7cd7b7eb2c7108c
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Sep 13 15:52:34 2022 +0200

    Add date-based index to origin_visit
    
    This will help queries retrieving origin_visits by date by avoiding
    having to scan all visits for the origin.

commit 0786ab17490233130ad2c0310ba14e0b7d56d8e9
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Sep 13 15:51:57 2022 +0200

    SQL upgrade scripts don't need to bump dbversion anymore

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1664/ for more details.