Programming, Sql, Postgresql, Performance, Data Engineering.
to do this is to simply use EXISTS. EXISTS [1] can be a big performance booster since it returns as soon as it finds even a single row that matches the internal condition. SELECT count(*) FROM acc_{account_id}.urls as recordings_urls, acc_{account_id}.recording_data as recording_data,