Programming, Sql, Postgresql, Performance, Data Engineering.
stopping as soon as a condition (match) is met. Does that remind you of something? Yep, EXISTS. Since recording_data.urls can be referred from outside the subquery's context, and when that happens, we can back to our old friend EXISTS, and wrap the subquery with it. Combining all together, we get