Can someone tell me why these two equivalent queries, one involving a "naked" EXISTS versus one involving an EXISTS inside a SELECT statement perform so differently? I can see that the slow one scans the entire child table while the fast one only scans children that have the same parent_id as the parent. The tables have been vacuumed. I have confirmed both give the same results across the whole table.