explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Z6Jo

Settings
# exclusive inclusive rows x rows loops node
1. 0.507 681.955 ↑ 1.0 100 1

Limit (cost=53,017.70..53,023.70 rows=100 width=210) (actual time=680.569..681.955 rows=100 loops=1)

2. 0.845 681.448 ↑ 26.7 100 1

GroupAggregate (cost=53,017.70..53,177.66 rows=2,666 width=210) (actual time=680.566..681.448 rows=100 loops=1)

  • Group Key: i.id, attr.weight, attr.complete, attr.type
3. 91.185 680.603 ↑ 26.4 101 1

Sort (cost=53,017.70..53,024.36 rows=2,666 width=569) (actual time=680.523..680.603 rows=101 loops=1)

  • Sort Key: i.id, attr.weight, attr.complete, attr.type
  • Sort Method: external merge Disk: 21744kB
4. 126.889 589.418 ↓ 15.0 40,014 1

Nested Loop Left Join (cost=1,189.51..52,865.99 rows=2,666 width=569) (actual time=6.222..589.418 rows=40,014 loops=1)

  • Join Filter: (period_attr.bo_instance_id = period_i.id)
5. 89.259 422.515 ↓ 15.0 40,014 1

Nested Loop (cost=1,189.37..52,817.84 rows=2,666 width=499) (actual time=6.210..422.515 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.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=59) (actual time=0.012..0.014 rows=1 loops=1)

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

Gather (cost=1,188.94..52,756.07 rows=2,666 width=552) (actual time=6.191..333.242 rows=40,014 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 72.765 513.349 ↓ 12.0 13,338 3

Nested Loop Left Join (cost=188.94..51,489.47 rows=1,111 width=552) (actual time=2.520..513.349 rows=13,338 loops=3)

9. 87.241 440.581 ↓ 12.0 13,338 3

Nested Loop Left Join (cost=188.51..44,049.78 rows=1,111 width=342) (actual time=2.512..440.581 rows=13,338 loops=3)

10. 71.167 353.336 ↓ 12.0 13,338 3

Nested Loop Left Join (cost=188.08..43,316.35 rows=1,111 width=334) (actual time=2.501..353.336 rows=13,338 loops=3)

11. 92.779 282.166 ↓ 12.0 13,338 3

Nested Loop Left Join (cost=187.66..42,569.89 rows=1,111 width=124) (actual time=2.480..282.166 rows=13,338 loops=3)

12. 89.918 189.383 ↓ 12.0 13,338 3

Nested Loop Left Join (cost=187.23..41,190.51 rows=1,111 width=116) (actual time=2.450..189.383 rows=13,338 loops=3)

13. 76.342 99.461 ↓ 12.0 13,338 3

Nested Loop (cost=186.80..40,528.04 rows=1,111 width=67) (actual time=2.431..99.461 rows=13,338 loops=3)

14. 19.195 23.116 ↓ 4.4 13,338 3

Parallel Bitmap Heap Scan on boi_rel period_rel (cost=186.37..21,364.36 rows=3,006 width=16) (actual time=2.403..23.116 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=1547
15. 3.921 3.921 ↓ 5.5 40,014 1

Bitmap Index Scan on boi_rel_to_bo_instance_id_boc_rel_type_id_idx (cost=0.00..184.57 rows=7,214 width=0) (actual time=3.920..3.921 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.38 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.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=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.70 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.006 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.008 0.008 ↑ 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.008 rows=1 loops=1)

  • Index Cond: (bo_instance_id = 10963370)
Planning time : 4.490 ms
Execution time : 686.171 ms