explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DUu4

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

Limit (cost=53,363.33..53,369.33 rows=100 width=210) (actual time=686.874..688.225 rows=100 loops=1)

2. 0.818 687.721 ↑ 26.8 100 1

GroupAggregate (cost=53,363.33..53,524.25 rows=2,682 width=210) (actual time=686.872..687.721 rows=100 loops=1)

  • Group Key: i.id, attr.weight, attr.complete, attr.type
3. 94.509 686.903 ↑ 26.6 101 1

Sort (cost=53,363.33..53,370.04 rows=2,682 width=569) (actual time=686.824..686.903 rows=101 loops=1)

  • Sort Key: i.id, attr.weight, attr.complete, attr.type
  • Sort Method: external merge Disk: 21744kB
4. 131.552 592.394 ↓ 14.9 40,014 1

Nested Loop Left Join (cost=1,194.47..53,210.61 rows=2,682 width=569) (actual time=6.226..592.394 rows=40,014 loops=1)

  • Join Filter: (period_attr.bo_instance_id = period_i.id)
5. 59.036 420.828 ↓ 14.9 40,014 1

Nested Loop (cost=1,194.32..53,162.21 rows=2,682 width=499) (actual time=6.213..420.828 rows=40,014 loops=1)

6. 0.015 0.015 ↑ 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.015 rows=1 loops=1)

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

Gather (cost=1,193.89..53,126.95 rows=2,682 width=474) (actual time=6.199..361.777 rows=40,014 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 74.996 526.951 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=193.89..51,858.75 rows=1,118 width=474) (actual time=2.436..526.951 rows=13,338 loops=3)

9. 89.712 451.952 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=193.47..44,495.75 rows=1,118 width=290) (actual time=2.428..451.952 rows=13,338 loops=3)

10. 73.070 362.236 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=193.04..43,757.68 rows=1,118 width=282) (actual time=2.417..362.236 rows=13,338 loops=3)

11. 95.941 289.163 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=192.61..43,011.91 rows=1,118 width=98) (actual time=2.394..289.163 rows=13,338 loops=3)

12. 92.867 193.218 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=192.18..41,619.58 rows=1,118 width=90) (actual time=2.362..193.218 rows=13,338 loops=3)

13. 77.644 100.347 ↓ 11.9 13,338 3

Nested Loop (cost=191.75..40,951.81 rows=1,118 width=41) (actual time=2.337..100.347 rows=13,338 loops=3)

14. 18.735 22.700 ↓ 4.4 13,338 3

Parallel Bitmap Heap Scan on boi_rel period_rel (cost=191.33..21,589.10 rows=3,045 width=16) (actual time=2.306..22.700 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=1661
15. 3.965 3.965 ↓ 5.5 40,014 1

Bitmap Index Scan on boi_rel_to_bo_instance_id_boc_rel_type_id_idx (cost=0.00..189.50 rows=7,307 width=0) (actual time=3.964..3.965 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.36 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.16 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.59 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.006..0.009 rows=1 loops=1)

  • Index Cond: (bo_instance_id = 10963370)
Planning time : 3.111 ms
Execution time : 692.239 ms