Distinct Parent Sort (Join Explosion)

  • Join: Single Feature (Local Field with Deduplication)
  • Description: The user wants to find users that match criteria in the comments table (a “Many” side join), ordered by a field on the users table. Because joining to comments explodes the row count (1 User -> N Comments), the query requires DISTINCT. This tests the engine’s ability to maintain the sort order while deduplicating the join results.

Query Info (statistics from 100k dataset; larger datasets may have different values):

  • reputation > 100 selectivity on users.reputation: ~82% (active users are overrepresented at smaller sizes; likely lower for larger datasets)
  • score > 0 selectivity on comments.score: ~17%