explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ov4v

Settings
# exclusive inclusive rows x rows loops node
1. 2.279 958.565 ↓ 200.8 3,614 1

Nested Loop (cost=22,585.59..68,112.87 rows=18 width=8) (actual time=297.809..958.565 rows=3,614 loops=1)

2. 5.313 945.438 ↓ 18.2 3,616 1

Subquery Scan on lc (cost=22,585.30..66,793.69 rows=199 width=4) (actual time=297.780..945.438 rows=3,616 loops=1)

  • Filter: (lc.checkpoint = 'finished'::mission_checkpoint_v2)
  • Rows Removed by Filter: 35693
3. 617.651 940.125 ↑ 1.0 39,309 1

GroupAggregate (cost=22,585.30..66,296.22 rows=39,798 width=16) (actual time=297.059..940.125 rows=39,309 loops=1)

  • Group Key: cm_1.id
4. 160.508 322.474 ↓ 1.2 161,440 1

Sort (cost=22,585.30..22,912.39 rows=130,837 width=24) (actual time=296.671..322.474 rows=161,440 loops=1)

  • Sort Key: cm_1.id
  • Sort Method: external merge Disk: 4360kB
5. 39.700 161.966 ↓ 1.2 161,440 1

Hash Left Join (cost=2,230.29..8,781.35 rows=130,837 width=24) (actual time=21.292..161.966 rows=161,440 loops=1)

  • Hash Cond: (ca.question_id = q.id)
  • Join Filter: (o.id IS NULL)
  • Rows Removed by Join Filter: 6637
6. 26.878 120.473 ↓ 1.2 161,440 1

Hash Left Join (cost=2,011.87..6,763.91 rows=130,837 width=28) (actual time=19.470..120.473 rows=161,440 loops=1)

  • Hash Cond: (ca.option_id = o.id)
7. 59.502 92.809 ↓ 1.2 161,440 1

Hash Right Join (cost=1,843.45..6,085.83 rows=130,837 width=24) (actual time=18.671..92.809 rows=161,440 loops=1)

  • Hash Cond: (ca.customer_mission_id = cm_1.id)
8. 14.770 14.770 ↑ 1.0 129,842 1

Seq Scan on customer_answers ca (cost=0.00..2,443.37 rows=130,837 width=20) (actual time=0.015..14.770 rows=129,842 loops=1)

9. 7.819 18.537 ↑ 1.0 39,309 1

Hash (cost=1,345.98..1,345.98 rows=39,798 width=8) (actual time=18.537..18.537 rows=39,309 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2048kB
10. 10.718 10.718 ↑ 1.0 39,309 1

Seq Scan on customer_missions cm_1 (cost=0.00..1,345.98 rows=39,798 width=8) (actual time=0.016..10.718 rows=39,309 loops=1)

11. 0.024 0.786 ↓ 1.1 192 1

Hash (cost=166.16..166.16 rows=180 width=8) (actual time=0.786..0.786 rows=192 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
12. 0.762 0.762 ↓ 1.1 192 1

Seq Scan on options o (cost=0.00..166.16 rows=180 width=8) (actual time=0.013..0.762 rows=192 loops=1)

  • Filter: (checkpoint IS NOT NULL)
  • Rows Removed by Filter: 7055
13. 0.542 1.793 ↑ 1.1 4,203 1

Hash (cost=163.19..163.19 rows=4,419 width=8) (actual time=1.793..1.793 rows=4,203 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 213kB
14. 1.251 1.251 ↑ 1.1 4,203 1

Seq Scan on questions q (cost=0.00..163.19 rows=4,419 width=8) (actual time=0.011..1.251 rows=4,203 loops=1)

15. 10.848 10.848 ↑ 1.0 1 3,616

Index Scan using customer_missions_pkey on customer_missions cm (cost=0.29..6.62 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=3,616)

  • Index Cond: (id = lc.customer_mission_id)
  • Filter: (finished_at IS NOT NULL)
  • Rows Removed by Filter: 0