explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8ppa

Settings
# exclusive inclusive rows x rows loops node
1. 0.219 2,236.908 ↑ 1.0 100 1

Limit (cost=138,008.70..138,014.70 rows=100 width=210) (actual time=2,235.841..2,236.908 rows=100 loops=1)

2. 0.822 2,236.689 ↑ 13.7 100 1

GroupAggregate (cost=138,008.70..138,090.60 rows=1,365 width=210) (actual time=2,235.838..2,236.689 rows=100 loops=1)

  • Group Key: i.id, attr.weight, attr.complete, attr.type
3. 103.594 2,235.867 ↑ 13.5 101 1

Sort (cost=138,008.70..138,012.11 rows=1,365 width=569) (actual time=2,235.788..2,235.867 rows=101 loops=1)

  • Sort Key: i.id, attr.weight, attr.complete, attr.type
  • Sort Method: external merge Disk: 21744kB
4. 142.616 2,132.273 ↓ 29.3 40,014 1

Nested Loop Left Join (cost=1,003.14..137,937.62 rows=1,365 width=569) (actual time=639.722..2,132.273 rows=40,014 loops=1)

5. 143.505 1,909.629 ↓ 29.3 40,014 1

Nested Loop Left Join (cost=1,003.00..137,695.29 rows=1,365 width=499) (actual time=639.710..1,909.629 rows=40,014 loops=1)

6. 689.623 1,606.068 ↓ 29.3 40,014 1

Gather (cost=1,002.57..136,881.37 rows=1,365 width=450) (actual time=639.682..1,606.068 rows=40,014 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 180.260 916.445 ↓ 23.4 13,338 3

Nested Loop Left Join (cost=2.57..135,744.87 rows=569 width=450) (actual time=475.050..916.445 rows=13,338 loops=3)

  • Filter: ((i.search_text ~~* '%%'::text) OR (person_i.search_text ~~* '%%'::text) OR (manager_i.search_text ~~* '%%'::text) OR (period_i.search_text ~~* '%%'::text))
8. 65.653 736.175 ↓ 23.4 13,338 3

Nested Loop Left Join (cost=1.71..131,553.30 rows=569 width=336) (actual time=475.042..736.175 rows=13,338 loops=3)

9. 88.831 670.519 ↓ 23.4 13,338 3

Nested Loop Left Join (cost=1.29..131,171.00 rows=569 width=126) (actual time=475.029..670.519 rows=13,338 loops=3)

10. 70.937 581.684 ↓ 23.4 13,338 3

Nested Loop (cost=0.86..130,464.55 rows=569 width=118) (actual time=475.018..581.684 rows=13,338 loops=3)

11. 0.000 510.744 ↓ 8.7 13,338 3

Nested Loop (cost=0.43..129,427.47 rows=1,539 width=67) (actual time=475.007..510.744 rows=13,338 loops=3)

12. 474.996 474.996 ↓ 0.0 0 3

Parallel Seq Scan on bo_instance period_i (cost=0.00..49,301.49 rows=3,648 width=59) (actual time=474.981..474.996 rows=0 loops=3)

  • Filter: ((NOT is_deleted) AND ((id)::text ~~* '10963370'::text))
  • Rows Removed by Filter: 583638
13. 54.109 54.109 ↓ 4,446.0 40,014 1

Index Scan using boi_rel_to_bo_instance_id_boc_rel_type_id_idx on boi_rel period_rel (cost=0.43..21.87 rows=9 width=16) (actual time=0.066..54.109 rows=40,014 loops=1)

  • Index Cond: ((to_bo_instance_id = period_i.id) AND (boc_rel_type_id = 20))
  • Filter: (NOT is_deleted)
14. 0.003 0.003 ↑ 1.0 1 40,014

Index Scan using bo_instance_pkey on bo_instance i (cost=0.43..0.67 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))
15. 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)
16. 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)
17. 0.004 0.010 ↑ 1.0 1 40,014

Nested Loop Left Join (cost=0.86..7.35 rows=1 width=226) (actual time=0.008..0.010 rows=1 loops=40,014)

18. 0.003 0.003 ↑ 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.002..0.003 rows=1 loops=40,014)

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

Index Scan using bo_instance_pkey on bo_instance manager_i (cost=0.43..6.70 rows=1 width=218) (actual time=0.003..0.003 rows=1 loops=40,006)

  • Index Cond: (id = manager_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
20. 160.056 160.056 ↑ 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)
21. 80.028 80.028 ↑ 1.0 1 40,014

Index Scan using idx_attrib_period_bo_instance_id on attrib_period period_attr (cost=0.14..0.17 rows=1 width=78) (actual time=0.002..0.002 rows=1 loops=40,014)

  • Index Cond: (bo_instance_id = period_i.id)
Planning time : 5.409 ms
Execution time : 2,241.034 ms