-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverse counting logic in stream filters
We count all the exercises that are marked as 'read' so that we can compute the 'unread' count for the sidebar navigation in each category. Since some things will be marked as read both based on a watermark and based on direct views, we would double count them. To avoid that we need to either exclude the relevant views when counting the watermarks, or exclude the relevant watermarks when counting the relevant views. The performance of using NOT IN against the views table (7MM rows) was dismal to the point of taking down production when certain users accessed the activity stream. This reverses the logic so we're excluding watermarks when counting direct views.
- Loading branch information
Katrina Owen
committed
Oct 13, 2016
1 parent
603c43d
commit 96744de
Showing
2 changed files
with
48 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters