explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PVtH

Settings
# exclusive inclusive rows x rows loops node
1. 0.504 712.623 ↑ 1.0 100 1

Limit (cost=54,179.64..54,185.64 rows=100 width=210) (actual time=711.246..712.623 rows=100 loops=1)

2. 0.834 712.119 ↑ 27.5 100 1

GroupAggregate (cost=54,179.64..54,344.52 rows=2,748 width=210) (actual time=711.243..712.119 rows=100 loops=1)

  • Group Key: i.id, attr.weight, attr.complete, attr.type
3. 95.832 711.285 ↑ 27.2 101 1

Sort (cost=54,179.64..54,186.51 rows=2,748 width=569) (actual time=711.199..711.285 rows=101 loops=1)

  • Sort Key: i.id, attr.weight, attr.complete, attr.type
  • Sort Method: external merge Disk: 21744kB
4. 142.296 615.453 ↓ 14.6 40,014 1

Nested Loop Left Join (cost=1,196.06..54,022.67 rows=2,748 width=569) (actual time=6.245..615.453 rows=40,014 loops=1)

  • Join Filter: (period_attr.bo_instance_id = period_i.id)
5. 61.698 433.143 ↓ 14.6 40,014 1

Nested Loop (cost=1,195.91..53,973.29 rows=2,748 width=499) (actual time=6.232..433.143 rows=40,014 loops=1)

6. 0.014 0.014 ↑ 1.0 1 1

Index Scan using bo_instance_pkey on bo_instance period_i (cost=0.43..8.45 rows=1 width=33) (actual time=0.011..0.014 rows=1 loops=1)

  • Index Cond: (id = 10963370)
  • Filter: (NOT is_deleted)
7. 0.000 371.431 ↓ 14.6 40,014 1

Gather (cost=1,195.48..53,937.36 rows=2,748 width=474) (actual time=6.217..371.431 rows=40,014 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 79.704 545.380 ↓ 11.6 13,338 3

Nested Loop Left Join (cost=195.48..52,662.56 rows=1,145 width=474) (actual time=2.439..545.380 rows=13,338 loops=3)

9. 94.766 465.673 ↓ 11.6 13,338 3

Nested Loop Left Join (cost=195.06..45,270.15 rows=1,145 width=290) (actual time=2.430..465.673 rows=13,338 loops=3)

10. 73.620 370.903 ↓ 11.6 13,338 3

Nested Loop Left Join (cost=194.63..44,514.28 rows=1,145 width=282) (actual time=2.419..370.903 rows=13,338 loops=3)

11. 99.475 297.280 ↓ 11.6 13,338 3

Nested Loop Left Join (cost=194.20..43,746.02 rows=1,145 width=98) (actual time=2.395..297.280 rows=13,338 loops=3)

12. 92.607 197.801 ↓ 11.6 13,338 3

Nested Loop Left Join (cost=193.77..42,322.42 rows=1,145 width=90) (actual time=2.361..197.801 rows=13,338 loops=3)

13. 80.854 105.190 ↓ 11.6 13,338 3

Nested Loop (cost=193.34..41,639.15 rows=1,145 width=41) (actual time=2.344..105.190 rows=13,338 loops=3)

14. 20.376 24.333 ↓ 4.3 13,338 3

Parallel Bitmap Heap Scan on boi_rel period_rel (cost=192.92..21,955.29 rows=3,109 width=16) (actual time=2.314..24.333 rows=13,338 loops=3)

  • Recheck Cond: ((to_bo_instance_id = 10963370) AND (boc_rel_type_id = 20))
  • Filter: (NOT is_deleted)
  • Heap Blocks: exact=1654
15. 3.957 3.957 ↓ 5.4 40,014 1

Bitmap Index Scan on boi_rel_to_bo_instance_id_boc_rel_type_id_idx (cost=0.00..191.05 rows=7,462 width=0) (actual time=3.956..3.957 rows=40,014 loops=1)

  • Index Cond: ((to_bo_instance_id = 10963370) AND (boc_rel_type_id = 20))
16. 0.003 0.003 ↑ 1.0 1 40,014

Index Scan using bo_instance_pkey on bo_instance i (cost=0.43..6.33 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=40,014)

  • Index Cond: (id = period_rel.from_bo_instance_id)
  • Filter: ((NOT is_deleted) AND (bo_class_id = 15) AND (tenant_id = 319))
17. 0.004 0.004 ↑ 1.0 1 40,014

Index Scan using idx_attrib_goal_bo_instance_id on attrib_goal attr (cost=0.42..0.59 rows=1 width=57) (actual time=0.003..0.004 rows=1 loops=40,014)

  • Index Cond: (bo_instance_id = i.id)
18. 0.004 0.004 ↑ 9.0 1 40,014

Index Scan using boi_rel_to_bo_instance_id_boc_rel_type_id_idx on boi_rel person_rel (cost=0.43..1.15 rows=9 width=16) (actual time=0.003..0.004 rows=1 loops=40,014)

  • Index Cond: ((to_bo_instance_id = i.id) AND (boc_rel_type_id = 29))
  • Filter: (NOT is_deleted)
19. 0.003 0.003 ↑ 1.0 1 40,014

Index Scan using bo_instance_pkey on bo_instance person_i (cost=0.43..0.67 rows=1 width=192) (actual time=0.003..0.003 rows=1 loops=40,014)

  • Index Cond: (id = person_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
20. 0.004 0.004 ↑ 1.0 1 40,014

Index Scan using boi_rel_to_bo_instance_id_boc_rel_type_id_idx on boi_rel manager_rel (cost=0.43..0.65 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=40,014)

  • Index Cond: ((to_bo_instance_id = person_i.id) AND (boc_rel_type_id = 26))
  • Filter: (NOT is_deleted)
21. 0.003 0.003 ↑ 1.0 1 40,014

Index Scan using bo_instance_pkey on bo_instance manager_i (cost=0.43..6.46 rows=1 width=192) (actual time=0.003..0.003 rows=1 loops=40,014)

  • Index Cond: (id = manager_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
22. 40.005 40.014 ↑ 1.0 1 40,014

Materialize (cost=0.14..8.17 rows=1 width=78) (actual time=0.001..0.001 rows=1 loops=40,014)

23. 0.009 0.009 ↑ 1.0 1 1

Index Scan using idx_attrib_period_bo_instance_id on attrib_period period_attr (cost=0.14..8.16 rows=1 width=78) (actual time=0.007..0.009 rows=1 loops=1)

  • Index Cond: (bo_instance_id = 10963370)
Planning time : 3.292 ms
Execution time : 716.715 ms