Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/dbv1/get_playlists.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion api/dbv1/get_tracks.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion api/dbv1/queries/get_playlists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ WITH my_follows AS (
AND follower_user_id = @my_id
AND follows.is_delete = false
ORDER BY follower_count DESC
LIMIT 5000
-- See get_tracks.sql for rationale.
LIMIT 200
)
SELECT
p.description,
Expand Down
6 changes: 5 additions & 1 deletion api/dbv1/queries/get_tracks.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ WITH my_follows AS (
AND follower_user_id = @my_id
AND follows.is_delete = false
ORDER BY follower_count DESC
LIMIT 5000
-- The two consumers (followee_reposts, followee_favorites) both
-- emit at most 3 rows ordered by follower_count DESC. Caring about
-- followees ranked >200 by follower_count is wasted work: they're
-- ~always dominated by the top-200 in social-proof terms.
LIMIT 200
)
SELECT
t.track_id,
Expand Down
Loading