explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iAan

Settings
# exclusive inclusive rows x rows loops node
1. 747.177 933.850 ↑ 2.6 678,669 1

Hash Right Join (cost=45,960.22..64,365.61 rows=1,783,865 width=238) (actual time=185.080..933.850 rows=678,669 loops=1)

  • Hash Cond: (ff.asset_id = am.id)
2. 0.380 1.769 ↓ 11.6 885 1

Nested Loop Left Join (cost=1.58..69.94 rows=76 width=81) (actual time=0.063..1.769 rows=885 loops=1)

3. 0.258 0.504 ↓ 11.6 885 1

Hash Right Join (cost=1.30..43.53 rows=76 width=12) (actual time=0.055..0.504 rows=885 loops=1)

  • Hash Cond: (aff.asset_id = ff.asset_id)
4. 0.228 0.228 ↑ 2.0 890 1

Seq Scan on asset_flexi_field_responses aff (cost=0.00..34.80 rows=1,780 width=8) (actual time=0.027..0.228 rows=890 loops=1)

5. 0.004 0.018 ↓ 4.0 4 1

Hash (cost=1.29..1.29 rows=1 width=8) (actual time=0.018..0.018 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.014 0.014 ↓ 4.0 4 1

Seq Scan on flexi_fields ff (cost=0.00..1.29 rows=1 width=8) (actual time=0.012..0.014 rows=4 loops=1)

  • Filter: (input_type = 12)
  • Rows Removed by Filter: 19
7. 0.885 0.885 ↓ 0.0 0 885

Index Scan using asset_receive_attachments_pkey on asset_receive_attachments ara (cost=0.28..0.34 rows=1 width=77) (actual time=0.001..0.001 rows=0 loops=885)

  • Index Cond: (id = aff.asset_receive_id)
8. 6.801 184.904 ↑ 1.2 19,443 1

Hash (cost=45,666.34..45,666.34 rows=23,384 width=89) (actual time=184.904..184.904 rows=19,443 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2566kB
9. 14.231 178.103 ↑ 1.2 19,443 1

Nested Loop Left Join (cost=21,649.07..45,666.34 rows=23,384 width=89) (actual time=112.068..178.103 rows=19,443 loops=1)

10. 4.119 144.429 ↑ 1.2 19,443 1

Hash Left Join (cost=21,648.65..24,594.55 rows=23,384 width=62) (actual time=112.058..144.429 rows=19,443 loops=1)

  • Hash Cond: (ab.asset_id = am.id)
11. 24.590 140.293 ↑ 1.2 19,443 1

Hash Left Join (cost=21,646.91..24,271.28 rows=23,384 width=51) (actual time=112.028..140.293 rows=19,443 loops=1)

  • Hash Cond: (ab.employee_id = e.id)
12. 3.967 3.967 ↑ 1.2 19,443 1

Seq Scan on asset_distribute ab (cost=0.00..698.84 rows=23,384 width=16) (actual time=0.104..3.967 rows=19,443 loops=1)

13. 41.150 111.736 ↓ 1.0 156,342 1

Hash (cost=18,319.07..18,319.07 rows=156,307 width=43) (actual time=111.736..111.736 rows=156,342 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 3206kB
14. 70.586 70.586 ↓ 1.0 156,342 1

Seq Scan on employees e (cost=0.00..18,319.07 rows=156,307 width=43) (actual time=0.095..70.586 rows=156,342 loops=1)

15. 0.012 0.017 ↓ 1.2 39 1

Hash (cost=1.33..1.33 rows=33 width=15) (actual time=0.017..0.017 rows=39 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
16. 0.005 0.005 ↓ 1.2 39 1

Seq Scan on asset_master am (cost=0.00..1.33 rows=33 width=15) (actual time=0.003..0.005 rows=39 loops=1)

17. 19.443 19.443 ↑ 1.0 1 19,443

Index Scan using employees_pkey on employees e1 (cost=0.42..0.89 rows=1 width=35) (actual time=0.001..0.001 rows=1 loops=19,443)

  • Index Cond: (id = e.manager_id)
Planning time : 0.813 ms