QUERY PLAN
GroupAggregate (cost=1000.12..4395.55 rows=4 width=12)
Group Key: uc.object_id
-> Nested Loop (cost=1000.12..4395.46 rows=10 width=4)
Join Filter: (uc.object_id = rccr.punch_overtime_id)
-> Nested Loop (cost=1000.12..4359.83 rows=1 width=8)
Join Filter: (uc.object_id = r.id)
-> Index Only Scan using tbl_punch_overtimes_pkey on tbl_punch_overtimes r (cost=0.12..8.14 rows=1 width=4)
-> Gather (cost=1000.00..4351.64 rows=4 width=4)
Workers Planned: 1
-> Parallel Seq Scan on tbl_unread_comments uc (cost=0.00..3351.24 rows=2 width=4)
Filter: ((NOT is_read) AND ((object_type)::text = '42'::text) AND (remind_user_id = 1001))
-> Seq Scan on tbl_punch_overtime_carbon_copy_rels rccr (cost=0.00..35.50 rows=10 width=4)
Filter: (user_id = 1001)