Skip to content

Conversation

raymondjacobson
Copy link
Member

No description provided.

Copy link
Contributor

@schottra schottra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good just worried about the CTE

@@ -36,6 +36,13 @@ func (app *ApiServer) v1TrackCommentCount(c *fiber.Ctx) error {
WHERE score < 0
),

-- Deactivated users
deactivated_users AS (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this potentially be a huge set that we mostly don't use? Wondering if this is better as just a join on users and then filter afterwards on users.is_deactivated. Maybe I don't understand how the query planning works. Does it evaluate this whole result set and store it before moving on? Or would it pull from this query as needed for processing the final result set?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inlined by default!

@raymondjacobson raymondjacobson merged commit 74e0f3d into main Sep 20, 2025
5 checks passed
@raymondjacobson raymondjacobson deleted the rj-comments-deactive branch September 20, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants