explain.depesz.com

PostgreSQL's explain analyze made readable

Result: alk4

Settings
# exclusive inclusive rows x rows loops node
1. 0.521 703.115 ↑ 1.0 100 1

Limit (cost=53,390.15..53,396.15 rows=100 width=210) (actual time=701.745..703.115 rows=100 loops=1)

2. 0.818 702.594 ↑ 26.8 100 1

GroupAggregate (cost=53,390.15..53,551.07 rows=2,682 width=210) (actual time=701.742..702.594 rows=100 loops=1)

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

Sort (cost=53,390.15..53,396.86 rows=2,682 width=569) (actual time=701.697..701.776 rows=101 loops=1)

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

Nested Loop Left Join (cost=1,194.47..53,237.43 rows=2,682 width=569) (actual time=6.479..606.903 rows=40,014 loops=1)

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

Nested Loop (cost=1,194.32..53,189.03 rows=2,682 width=499) (actual time=6.464..436.971 rows=40,014 loops=1)

  • Join Filter: ((i.search_text ~~* '%%'::text) OR (person_i.search_text ~~* '%%'::text) OR (manager_i.search_text ~~* '%%'::text) OR (period_i.search_text ~~* '%%'::text))
6. 0.017 0.017 ↑ 1.0 1 1

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

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

Gather (cost=1,193.89..53,126.95 rows=2,682 width=552) (actual time=6.438..346.338 rows=40,014 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 74.375 520.231 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=193.89..51,858.75 rows=1,118 width=552) (actual time=2.091..520.231 rows=13,338 loops=3)

9. 88.461 445.853 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=193.47..44,495.75 rows=1,118 width=342) (actual time=2.070..445.853 rows=13,338 loops=3)

10. 71.969 357.388 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=193.04..43,757.68 rows=1,118 width=334) (actual time=2.058..357.388 rows=13,338 loops=3)

11. 94.426 285.416 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=192.61..43,011.91 rows=1,118 width=124) (actual time=2.030..285.416 rows=13,338 loops=3)

12. 91.957 190.986 ↓ 11.9 13,338 3

Nested Loop Left Join (cost=192.18..41,619.58 rows=1,118 width=116) (actual time=1.991..190.986 rows=13,338 loops=3)

13. 76.989 99.025 ↓ 11.9 13,338 3

Nested Loop (cost=191.75..40,951.81 rows=1,118 width=67) (actual time=1.963..99.025 rows=13,338 loops=3)

14. 17.946 22.033 ↓ 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=1.922..22.033 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=1615
15. 4.087 4.087 ↓ 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=4.086..4.087 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=59) (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=218) (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=218) (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 : 4.557 ms
Execution time : 707.202 ms