Skip to content

LATERAL LEFT JOINs in Nested Relations Cause Performance Drop Compared to Simple LEFT JOINs #3944

Answered by wolfgangwalther
lxup asked this question in Q&A
Discussion options

You must be logged in to vote

PostgREST version: Whatever version Supabase uses as of March 2025 (I’m using Supabase, so I don’t have direct control over the exact PostgREST version; likely v10.x or v11.x based on Supabase’s updates)

I understand that you don't have control over that. But I have even less control and/or insight. I have never used Supabase, don't have any connection to it. So.. it would be good if you were to report the actually used PostgREST version.

The EXPLAIN ANALYZEnoutput from this request (via Supabase’s .explain({ analyze: true })) shows that PostgREST uses LATERAL LEFT JOINs instead of simple LEFT JOINs for the nested relations (media, user, review:user_review). This causes a significant p…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by wolfgangwalther
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3938 on March 09, 2025 13:34.