Trying on another server, it gives different result.
-> Index Scan using response_log_by_activity on public.response_log rl2 (cost=0.00..50.29 rows=17 width=8) (actual time=0.955..0.967 rows=0 loops=30895)
Output: rl2.activity_id, rl2.feed_id
Index Cond: (rl2.activity_id = rl.activity_id)
Filter: rl2.success
Buffers: shared hit=2311312 read=132342
-> Index Scan using activity_pkey on public.activity a (cost=0.00..49.79 rows=1 width=12) (actual time=13.747..13.762 rows=1 loops=30892)
Output: a.status_id, a.activity_id, a.visit_id
Index Cond: (a.activity_id = rl.activity_id)
Buffers: shared hit=124463 read=30175
Now, index scan on activity_pkey which take much slower. Can someone please explain these ?
Thanks