ValidPersonOrTeamCache should be a materialized view

Bug #660400 reported by Stuart Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Won't Fix
Low
Unassigned

Bug Description

ValidPersonOrTeamCache used to be a materialized view maintained by triggers. We had to replace it with a standard view when we split the DB into multiple replication sets. We have since consolidated things back into a single replication set so this change can be reverted. This will speed up the many queries that join with the view.

ValidPersonCache can be updated at the same time.

The alternative is to embed the 'valid person' logic into the queries that need it. This is problematic though as our definition of a 'valid person' could change or be dropped altogether, leaving us with many call sites to update and no easy way of identifying them.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 660400] [NEW] ValidPersonOrTeamCache should be a materialized view

Person._validity_clause shows a way of embedding the queries without
having lots of callsites.

Gary Poster (gary)
Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Medium
Curtis Hovey (sinzui)
Changed in launchpad:
importance: Medium → Low
Revision history for this message
Robert Collins (lifeless) wrote :

I think its better to nuke the view entirely.

Changed in launchpad:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.