explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g0ee

Settings
# exclusive inclusive rows x rows loops node
1. 3,577.428 82,334.900 ↑ 2.8 11,774 1

GroupAggregate (cost=6,257,357.52..6,272,198.26 rows=33,228 width=40) (actual time=76,602.047..82,334.900 rows=11,774 loops=1)

  • Group Key: a.user_id, tt.folder_id
  • Buffers: shared hit=25430474 read=3231685, temp read=114720 written=114718
2. 9,387.450 78,757.472 ↓ 6.8 9,891,188 1

Sort (cost=6,257,357.52..6,260,984.63 rows=1,450,846 width=48) (actual time=76,601.950..78,757.472 rows=9,891,188 loops=1)

  • Sort Key: a.user_id, tt.folder_id
  • Sort Method: external merge Disk: 560768kB
  • Buffers: shared hit=25430474 read=3231685, temp read=114720 written=114718
3. 2,277.200 69,370.022 ↓ 6.8 9,891,188 1

Hash Join (cost=1,390,021.97..6,108,874.58 rows=1,450,846 width=48) (actual time=45,098.995..69,370.022 rows=9,891,188 loops=1)

  • Hash Cond: (t.task_type_id = tt.id)
  • Buffers: shared hit=25430474 read=3231685, temp read=44612 written=44610
4. 3,920.803 67,092.716 ↓ 6.8 9,891,189 1

Hash Join (cost=1,390,015.72..6,089,029.46 rows=1,450,846 width=48) (actual time=45,098.874..67,092.716 rows=9,891,189 loops=1)

  • Hash Cond: (a.card_id = c.id)
  • Buffers: shared hit=25430470 read=3231685, temp read=44612 written=44610
5. 18,084.362 18,084.362 ↑ 1.2 10,274,607 1

Seq Scan on wf_assignment a (cost=0.00..4,414,057.27 rows=12,418,402 width=32) (actual time=0.091..18,084.362 rows=10,274,607 loops=1)

  • Filter: ((delete_ts IS NULL) AND (finished IS NULL) AND (user_id IS NOT NULL))
  • Rows Removed by Filter: 2259448
  • Buffers: shared hit=85378 read=3231685
6. 1,137.785 45,087.551 ↓ 1.1 2,903,919 1

Hash (cost=1,334,187.30..1,334,187.30 rows=2,622,353 width=48) (actual time=45,087.551..45,087.551 rows=2,903,919 loops=1)

  • Buckets: 2097152 Batches: 2 Memory Usage: 129754kB
  • Buffers: shared hit=25345092, temp written=12022
7. 3,539.382 43,949.766 ↓ 1.1 2,903,919 1

Merge Join (cost=0.99..1,334,187.30 rows=2,622,353 width=48) (actual time=0.061..43,949.766 rows=2,903,919 loops=1)

  • Merge Cond: (t.card_id = c.id)
  • Buffers: shared hit=25345092
8. 4,736.611 4,736.611 ↓ 1.1 2,936,092 1

Index Scan using dn_task_card_id_idx on dn_task t (cost=0.43..167,174.51 rows=2,732,946 width=32) (actual time=0.017..4,736.611 rows=2,936,092 loops=1)

  • Buffers: shared hit=2949176
9. 35,673.773 35,673.773 ↑ 1.4 15,245,041 1

Index Scan using wf_card_pkey on wf_card c (cost=0.56..1,080,113.10 rows=21,537,521 width=16) (actual time=0.013..35,673.773 rows=15,245,041 loops=1)

  • Filter: (delete_ts IS NULL)
  • Rows Removed by Filter: 629476
  • Buffers: shared hit=22395916
10. 0.030 0.106 ↑ 1.0 100 1

Hash (cost=5.00..5.00 rows=100 width=32) (actual time=0.106..0.106 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=4
11. 0.076 0.076 ↑ 1.0 100 1

Seq Scan on dn_task_type tt (cost=0.00..5.00 rows=100 width=32) (actual time=0.016..0.076 rows=100 loops=1)

  • Filter: ((delete_ts IS NULL) AND (folder_id IS NOT NULL))
  • Buffers: shared hit=4
Planning time : 2.536 ms
Execution time : 82,442.332 ms