explain.depesz.com

A tool for finding a real cause for slow queries.

Result: 9MW

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..29,316,478.27 rows=3,116 width=299) (actual time=.. rows= loops=)

  • Join Filter: (SubPlan 1)
2. 0.000 0.000 ↓ 0.0

Seq Scan on object_activity_feed f (cost=0.00..3,149.51 rows=6,231 width=40) (actual time=.. rows= loops=)

  • Filter: (object_id = 'a41fea12-31da-11e1-8c3a-123141000e52'::uuid)
3. 0.000 0.000 ↓ 0.0

Index Scan using pk_activity_id on activity a (cost=0.00..3.93 rows=1 width=259) (actual time=.. rows= loops=)

  • Index Cond: (a.activity_id = f.activity_id)
4.          

SubPlan (forNested Loop)

5. 0.000 0.000 ↓ 0.0

Limit (cost=4,700.12..4,700.37 rows=100 width=24) (actual time=.. rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=4,700.12..4,704.73 rows=1,846 width=24) (actual time=.. rows= loops=)

  • Sort Key: (max(f.update_time))
7. 0.000 0.000 ↓ 0.0

HashAggregate (cost=4,606.49..4,629.57 rows=1,846 width=24) (actual time=.. rows= loops=)

8. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on object_activity_feed f (cost=632.08..4,585.72 rows=4,154 width=24) (actual time=.. rows= loops=)

  • Recheck Cond: (object_id = 'a41fea12-31da-11e1-8c3a-123141000e52'::uuid)
  • Filter: (NOT has_read_activity('a41fea12-31da-11e1-8c3a-123141000e52'::uuid, $0))
9. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_object_activity_feed_object_id (cost=0.00..631.04 rows=6,231 width=0) (actual time=.. rows= loops=)

  • Index Cond: (object_id = 'a41fea12-31da-11e1-8c3a-123141000e52'::uuid)