explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7Skl

Settings
# exclusive inclusive rows x rows loops node
1. 0.180 3,450.415 ↑ 1.0 100 1

Limit (cost=14,377.96..14,388.46 rows=100 width=273) (actual time=3,444.548..3,450.415 rows=100 loops=1)

2. 5.414 3,450.235 ↑ 1.1 100 1

GroupAggregate (cost=14,377.96..14,389.09 rows=106 width=273) (actual time=3,444.546..3,450.235 rows=100 loops=1)

  • Group Key: i.id, attr.kudos_remaining
3. 238.506 3,444.821 ↓ 4.7 497 1

Sort (cost=14,377.96..14,378.23 rows=106 width=1,405) (actual time=3,444.353..3,444.821 rows=497 loops=1)

  • Sort Key: i.id, attr.kudos_remaining
  • Sort Method: external merge Disk: 86720kB
4. 285.390 3,206.315 ↓ 669.7 70,986 1

Nested Loop Left Join (cost=6.99..14,374.40 rows=106 width=1,405) (actual time=0.193..3,206.315 rows=70,986 loops=1)

  • Filter: ((i.search_text ~~* '%%'::text) OR (period_i.search_text ~~* '%%'::text) OR (from_person_i.search_text ~~* '%%'::text) OR (from_person_department_i.search_text ~~* '%%'::text) OR (from_person_team_i.search_text ~~* '%%'::text) OR (to_person_i.search_text ~~* '%%'::text) OR (to_person_department_i.search_text ~~* '%%'::text) OR (to_person_team_i.search_text ~~* '%%'::text))
5. 137.464 2,211.065 ↓ 669.7 70,986 1

Nested Loop Left Join (cost=6.14..13,338.94 rows=106 width=1,395) (actual time=0.171..2,211.065 rows=70,986 loops=1)

6. 151.837 1,860.643 ↓ 669.7 70,986 1

Nested Loop Left Join (cost=5.71..12,808.12 rows=106 width=1,185) (actual time=0.162..1,860.643 rows=70,986 loops=1)

7. 74.792 1,546.236 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=5.28..12,448.37 rows=106 width=1,177) (actual time=0.152..1,546.236 rows=32,514 loops=1)

8. 93.951 1,341.388 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=4.85..12,081.51 rows=106 width=967) (actual time=0.139..1,341.388 rows=32,514 loops=1)

9. 69.078 1,117.381 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=4.42..11,530.78 rows=106 width=959) (actual time=0.132..1,117.381 rows=32,514 loops=1)

10. 84.788 950.761 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=3.99..10,857.19 rows=106 width=749) (actual time=0.122..950.761 rows=32,514 loops=1)

11. 66.466 735.917 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=3.56..10,497.44 rows=106 width=741) (actual time=0.112..735.917 rows=32,514 loops=1)

12. 65.216 571.909 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=3.14..9,966.62 rows=106 width=531) (actual time=0.101..571.909 rows=32,514 loops=1)

13. 30.220 432.223 ↓ 140.5 14,894 1

Nested Loop Left Join (cost=2.71..9,606.87 rows=106 width=523) (actual time=0.089..432.223 rows=14,894 loops=1)

14. 36.116 342.427 ↓ 140.5 14,894 1

Nested Loop Left Join (cost=2.28..9,241.15 rows=106 width=313) (actual time=0.078..342.427 rows=14,894 loops=1)

15. 42.720 231.841 ↓ 140.5 14,894 1

Nested Loop Left Join (cost=1.85..8,690.42 rows=106 width=305) (actual time=0.068..231.841 rows=14,894 loops=1)

16. 20.734 129.545 ↓ 140.5 14,894 1

Nested Loop (cost=1.43..8,345.84 rows=106 width=297) (actual time=0.058..129.545 rows=14,894 loops=1)

17. 0.005 0.033 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.57..16.62 rows=1 width=230) (actual time=0.026..0.033 rows=1 loops=1)

  • Join Filter: (period_attr.bo_instance_id = period_i.id)
18. 0.020 0.020 ↑ 1.0 1 1

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

  • Index Cond: (id = 10963366)
  • Filter: (NOT is_deleted)
19. 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=45) (actual time=0.005..0.008 rows=1 loops=1)

  • Index Cond: (bo_instance_id = 10963366)
20. 42.758 108.778 ↓ 140.5 14,894 1

Nested Loop (cost=0.86..8,328.16 rows=106 width=75) (actual time=0.029..108.778 rows=14,894 loops=1)

21. 21.338 21.338 ↓ 17.7 14,894 1

Index Scan using boi_rel_is_deleted_to_bo_instance_id_boc_rel_type_id_idx on boi_rel period_rel (cost=0.43..1,517.26 rows=842 width=16) (actual time=0.019..21.338 rows=14,894 loops=1)

  • Index Cond: ((is_deleted = false) AND (to_bo_instance_id = 10963366) AND (boc_rel_type_id = 15))
  • Filter: (NOT is_deleted)
22. 44.682 44.682 ↑ 1.0 1 14,894

Index Scan using bo_instance_pkey on bo_instance i (cost=0.43..8.09 rows=1 width=67) (actual time=0.003..0.003 rows=1 loops=14,894)

  • Index Cond: (id = period_rel.from_bo_instance_id)
  • Filter: ((NOT is_deleted) AND (bo_class_id = 9) AND (tenant_id = 319))
23. 59.576 59.576 ↑ 1.0 1 14,894

Index Scan using idx_attrib_kudos_bo_instance_id on attrib_kudos attr (cost=0.42..3.24 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=14,894)

  • Index Cond: (bo_instance_id = i.id)
24. 74.470 74.470 ↑ 3.0 1 14,894

Index Scan using boi_rel_is_deleted_to_bo_instance_id_boc_rel_type_id_idx on boi_rel from_person_rel (cost=0.43..5.17 rows=3 width=16) (actual time=0.004..0.005 rows=1 loops=14,894)

  • Index Cond: ((is_deleted = false) AND (to_bo_instance_id = i.id) AND (boc_rel_type_id = 32))
  • Filter: (NOT is_deleted)
25. 59.576 59.576 ↑ 1.0 1 14,894

Index Scan using bo_instance_pkey on bo_instance from_person_i (cost=0.43..3.45 rows=1 width=218) (actual time=0.004..0.004 rows=1 loops=14,894)

  • Index Cond: (id = from_person_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
26. 74.470 74.470 ↓ 2.0 2 14,894

Index Scan using boi_rel_boc_rel_type_id_from_bo_instance_id_idx on boi_rel from_person_team_rel (cost=0.43..3.38 rows=1 width=16) (actual time=0.003..0.005 rows=2 loops=14,894)

  • Index Cond: ((boc_rel_type_id = 31) AND (from_bo_instance_id = from_person_i.id))
  • Filter: (NOT is_deleted)
27. 97.542 97.542 ↑ 1.0 1 32,514

Index Scan using bo_instance_pkey on bo_instance from_person_team_i (cost=0.43..5.01 rows=1 width=218) (actual time=0.003..0.003 rows=1 loops=32,514)

  • Index Cond: (id = from_person_team_rel.to_bo_instance_id)
  • Filter: (NOT is_deleted)
28. 130.056 130.056 ↑ 1.0 1 32,514

Index Scan using boi_rel_boc_rel_type_id_from_bo_instance_id_idx on boi_rel from_person_department_rel (cost=0.43..3.38 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=32,514)

  • Index Cond: ((boc_rel_type_id = 30) AND (from_bo_instance_id = from_person_i.id))
  • Filter: (NOT is_deleted)
29. 97.542 97.542 ↑ 1.0 1 32,514

Index Scan using bo_instance_pkey on bo_instance from_person_department_i (cost=0.43..6.35 rows=1 width=218) (actual time=0.003..0.003 rows=1 loops=32,514)

  • Index Cond: (id = from_person_department_rel.to_bo_instance_id)
  • Filter: (NOT is_deleted)
30. 130.056 130.056 ↑ 3.0 1 32,514

Index Scan using boi_rel_is_deleted_to_bo_instance_id_boc_rel_type_id_idx on boi_rel to_person_rel (cost=0.43..5.17 rows=3 width=16) (actual time=0.003..0.004 rows=1 loops=32,514)

  • Index Cond: ((is_deleted = false) AND (to_bo_instance_id = i.id) AND (boc_rel_type_id = 33))
  • Filter: (NOT is_deleted)
31. 130.056 130.056 ↑ 1.0 1 32,514

Index Scan using bo_instance_pkey on bo_instance to_person_i (cost=0.43..3.46 rows=1 width=218) (actual time=0.004..0.004 rows=1 loops=32,514)

  • Index Cond: (id = to_person_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
32. 162.570 162.570 ↓ 2.0 2 32,514

Index Scan using boi_rel_boc_rel_type_id_from_bo_instance_id_idx on boi_rel to_person_team_rel (cost=0.43..3.38 rows=1 width=16) (actual time=0.003..0.005 rows=2 loops=32,514)

  • Index Cond: ((boc_rel_type_id = 31) AND (from_bo_instance_id = to_person_i.id))
  • Filter: (NOT is_deleted)
33. 212.958 212.958 ↑ 1.0 1 70,986

Index Scan using bo_instance_pkey on bo_instance to_person_team_i (cost=0.43..5.01 rows=1 width=218) (actual time=0.003..0.003 rows=1 loops=70,986)

  • Index Cond: (id = to_person_team_rel.to_bo_instance_id)
  • Filter: (NOT is_deleted)
34. 212.958 709.860 ↑ 1.0 1 70,986

Nested Loop Left Join (cost=0.86..9.74 rows=1 width=226) (actual time=0.008..0.010 rows=1 loops=70,986)

35. 283.944 283.944 ↑ 1.0 1 70,986

Index Scan using boi_rel_boc_rel_type_id_from_bo_instance_id_idx on boi_rel to_person_department_rel (cost=0.43..3.38 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=70,986)

  • Index Cond: ((boc_rel_type_id = 30) AND (from_bo_instance_id = to_person_i.id))
  • Filter: (NOT is_deleted)
36. 212.958 212.958 ↑ 1.0 1 70,986

Index Scan using bo_instance_pkey on bo_instance to_person_department_i (cost=0.43..6.35 rows=1 width=218) (actual time=0.003..0.003 rows=1 loops=70,986)

  • Index Cond: (id = to_person_department_rel.to_bo_instance_id)
  • Filter: (NOT is_deleted)
Planning time : 7.734 ms
Execution time : 3,466.889 ms