CG <[EMAIL PROTECTED]> writes: > I'm still getting the nested loop for a join. > Nested Loop (cost=100000000.00..100013378.98 rows=2206 width=145) (actual > time=46.743..18202.318 rows=2225 loops=1) > -> Index Scan using packet_user_idx on packet dp (cost=0.00..88.03 > rows=2206 width=125) (actual time=42.263..124.519 rows=2225 loops=1) > Index Cond: ((username)::text = 'joeuser'::text) > -> Index Scan using packet_status_puuid_pkey on packet_status dps > (cost=0.00..6.01 rows=1 width=20) (actual time=8.115..8.117 rows=1 loops=2225) > Index Cond: ("outer".packet_uuid = dps.packet_uuid) > Total runtime: 18205.880 ms
If packet_status is large, that seems like a perfectly reasonable plan to me. If not ... what data type is packet_uuid? Is its equality op marked mergeable or hashable? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match