explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Cg8z

Settings
# exclusive inclusive rows x rows loops node
1. 3,930.951 19,184.950 ↓ 1.0 868,628 1

Merge Join (cost=290,684.60..396,900.55 rows=867,982 width=544) (actual time=11,626.547..19,184.950 rows=868,628 loops=1)

  • Merge Cond: ((dmdstate0_.dmd_id)::text = (distribute1_.id)::text)
  • Buffers: shared hit=727686 read=34144, temp read=30432 written=30432
  • I/O Timings: read=199.402
2. 641.625 641.625 ↑ 1.0 869,649 1

Index Scan using dmd_state_dmd_id_valid_from_idx on dmd_state dmdstate0_ (cost=0.42..72,235.10 rows=869,649 width=111) (actual time=0.004..641.625 rows=869,649 loops=1)

  • Buffers: shared hit=42444 read=23363
  • I/O Timings: read=121.725
3. 643.375 14,612.374 ↓ 1.5 868,629 1

Materialize (cost=290,684.17..293,539.75 rows=571,116 width=433) (actual time=11,626.509..14,612.374 rows=868,629 loops=1)

  • Buffers: shared hit=685242 read=10781, temp read=30432 written=30432
  • I/O Timings: read=77.677
4. 8,618.575 13,968.999 ↓ 1.0 571,230 1

Sort (cost=290,684.17..292,111.96 rows=571,116 width=433) (actual time=11,626.505..13,968.999 rows=571,230 loops=1)

  • Sort Key: distribute1_.id
  • Sort Method: external merge Disk: 243288kB
  • Buffers: shared hit=685242 read=10781, temp read=30432 written=30432
  • I/O Timings: read=77.677
5. 967.524 5,350.424 ↓ 1.0 571,230 1

Hash Join (cost=3,611.39..155,203.21 rows=571,116 width=433) (actual time=67.755..5,350.424 rows=571,230 loops=1)

  • Hash Cond: ((medicaldev2_.manufacturer_id)::text = (manufactur3_.id)::text)
  • Buffers: shared hit=685242 read=10781
  • I/O Timings: read=77.677
6. 3,845.933 4,315.189 ↓ 1.0 571,230 1

Merge Join (cost=0.85..128,748.02 rows=571,116 width=271) (actual time=0.018..4,315.189 rows=571,230 loops=1)

  • Merge Cond: ((medicaldev2_.id)::text = (distribute1_.medical_device_id)::text)
  • Buffers: shared hit=684429 read=10683
  • I/O Timings: read=77.007
7. 469.256 469.256 ↑ 1.0 553,672 1

Index Scan using mdd_pk on medical_device medicaldev2_ (cost=0.42..49,294.38 rows=553,672 width=154) (actual time=0.003..469.256 rows=553,672 loops=1)

  • Buffers: shared hit=119581 read=6720
  • I/O Timings: read=48.933
  • Filter: ((class_code)::text <> 'FAMHP'::text)
  • Rows Removed by Filter: 983
  • Buffers: shared hit=564848 read=3963
  • I/O Timings: read=28.074
8. 19.844 67.711 ↑ 1.0 26,478 1

Hash (cost=2,750.01..2,750.01 rows=26,478 width=162) (actual time=67.711..67.711 rows=26,478 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 4881kB
  • Buffers: shared hit=813 read=98
  • I/O Timings: read=0.670
9. 32.625 47.867 ↑ 1.0 26,478 1

Hash Join (cost=218.94..2,750.01 rows=26,478 width=162) (actual time=2.934..47.867 rows=26,478 loops=1)

  • Hash Cond: ((manufactur3_.company_id)::text = (company4_.id)::text)
  • Buffers: shared hit=813 read=98
  • I/O Timings: read=0.670
10. 12.329 12.329 ↑ 1.0 26,478 1

Seq Scan on manufacturer manufactur3_ (cost=0.00..1,604.34 rows=26,478 width=109) (actual time=0.005..12.329 rows=26,478 loops=1)

  • Buffers: shared hit=810
11. 1.119 2.913 ↑ 1.0 1,887 1

Hash (cost=157.61..157.61 rows=1,887 width=53) (actual time=2.913..2.913 rows=1,887 loops=1)

  • Buffers: shared hit=3 read=98
  • I/O Timings: read=0.670
12. 1.794 1.794 ↑ 1.0 1,887 1

Seq Scan on company company4_ (cost=0.00..157.61 rows=1,887 width=53) (actual time=0.018..1.794 rows=1,887 loops=1)

  • Buffers: shared hit=3 read=98
  • I/O Timings: read=0.670
Planning time : 5.124 ms
Execution time : 19,564.082 ms