PostgreSQL CTE by id string is very cheap, but by id from query is very expensive I use the id directly in the query, it has a low cost: