explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bacl

Settings
# exclusive inclusive rows x rows loops node
1. 216.452 10,131.147 ↓ 1.9 4,203 1

HashAggregate (cost=119,579.21..119,601.17 rows=2,196 width=4) (actual time=10,128.641..10,131.147 rows=4,203 loops=1)

  • Group Key: ae.account_id
2. 375.107 9,914.695 ↓ 139.3 306,007 1

Nested Loop (cost=47,488.94..119,573.72 rows=2,196 width=4) (actual time=2,419.080..9,914.695 rows=306,007 loops=1)

3. 254.799 8,472.235 ↓ 86.1 152,479 1

Nested Loop (cost=47,488.65..118,865.71 rows=1,770 width=4) (actual time=2,419.052..8,472.235 rows=152,479 loops=1)

4. 701.132 7,759.999 ↓ 86.1 152,479 1

Nested Loop (cost=47,488.36..118,302.12 rows=1,770 width=4) (actual time=2,419.038..7,759.999 rows=152,479 loops=1)

5. 653.458 4,708.203 ↓ 135.5 587,666 1

Hash Join (cost=47,487.93..116,173.17 rows=4,338 width=12) (actual time=2,418.033..4,708.203 rows=587,666 loops=1)

  • Hash Cond: (w.compliance_process_id = cp.compliance_process_id)
6. 929.980 4,054.632 ↓ 16.9 587,667 1

Hash Join (cost=47,484.49..115,996.23 rows=34,701 width=16) (actual time=2,417.910..4,054.632 rows=587,667 loops=1)

  • Hash Cond: (w.priority_cache_id = pc.priority_cache_id)
7. 708.064 708.064 ↑ 1.2 587,667 1

Index Scan using "IX_work_status_id" on work w (cost=0.43..65,478.37 rows=716,478 width=12) (actual time=0.012..708.064 rows=587,667 loops=1)

  • Index Cond: (status_id = ANY ('{16,15,51,27,28,29,31,32,33,53,52,55,56,54}'::integer[]))
8. 432.960 2,416.588 ↓ 1.0 532,481 1

Hash (cost=41,087.02..41,087.02 rows=511,763 width=20) (actual time=2,416.588..2,416.588 rows=532,481 loops=1)

  • Buckets: 1048576 (originally 524288) Batches: 1 (originally 1) Memory Usage: 37305kB
9. 894.094 1,983.628 ↓ 1.0 532,481 1

Merge Join (cost=5.90..41,087.02 rows=511,763 width=20) (actual time=0.028..1,983.628 rows=532,481 loops=1)

  • Merge Cond: (pel.part_entity_location_id = pc.part_entity_location_id)
10. 452.032 452.032 ↓ 1.0 601,462 1

Index Scan using "PK_part_entity_location" on part_entity_location pel (cost=0.42..15,539.48 rows=601,460 width=12) (actual time=0.011..452.032 rows=601,462 loops=1)

11. 637.502 637.502 ↑ 19.8 532,482 1

Index Scan using "IX_priority_cache_part_entity_location_id" on priority_cache pc (cost=0.43..364,374.10 rows=10,566,343 width=24) (actual time=0.011..637.502 rows=532,482 loops=1)

12. 0.049 0.113 ↑ 1.0 34 1

Hash (cost=3.01..3.01 rows=34 width=4) (actual time=0.113..0.113 rows=34 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
13. 0.064 0.064 ↑ 1.0 34 1

Index Scan using "IX_compliance_process_functional_area_id" on compliance_process cp (cost=0.15..3.01 rows=34 width=4) (actual time=0.023..0.064 rows=34 loops=1)

  • Index Cond: (functional_area_id = 2)
14. 2,350.664 2,350.664 ↓ 0.0 0 587,666

Index Scan using "PK_part_entity" on part_entity pe (cost=0.43..0.48 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=587,666)

  • Index Cond: (part_entity_id = pc.part_entity_id)
  • Filter: ((relationship_type_id = 1) AND (entity_id = ANY ('{1,2,3,9,430,1278,1326,1327,2465,2682,5255,5289,5291,8684,8685,8686}'::integer[])))
  • Rows Removed by Filter: 1
15. 457.437 457.437 ↑ 1.0 1 152,479

Index Scan using "PK_entity_location" on entity_location el (cost=0.29..0.31 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=152,479)

  • Index Cond: (entity_location_id = pel.entity_location_id)
16. 1,067.353 1,067.353 ↑ 1.0 2 152,479

Index Scan using "IX_account_entity_entity_id" on account_entity ae (cost=0.29..0.38 rows=2 width=8) (actual time=0.003..0.007 rows=2 loops=152,479)

  • Index Cond: (entity_id = el.entity_id)
  • Filter: (recipient_type = 'To'::citext)
  • Rows Removed by Filter: 3