explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MRl

Settings
# exclusive inclusive rows x rows loops node
1. 0.181 3,230.542 ↑ 1.0 100 1

Limit (cost=14,375.84..14,386.34 rows=100 width=273) (actual time=3,224.587..3,230.542 rows=100 loops=1)

2. 5.499 3,230.361 ↑ 1.1 100 1

GroupAggregate (cost=14,375.84..14,386.97 rows=106 width=273) (actual time=3,224.585..3,230.361 rows=100 loops=1)

  • Group Key: i.id, attr.kudos_remaining
3. 239.403 3,224.862 ↓ 4.7 497 1

Sort (cost=14,375.84..14,376.11 rows=106 width=1,405) (actual time=3,224.392..3,224.862 rows=497 loops=1)

  • Sort Key: i.id, attr.kudos_remaining
  • Sort Method: external merge Disk: 86720kB
4. 135.148 2,985.459 ↓ 669.7 70,986 1

Nested Loop Left Join (cost=6.99..14,372.28 rows=106 width=1,405) (actual time=0.197..2,985.459 rows=70,986 loops=1)

5. 177.497 2,637.353 ↓ 669.7 70,986 1

Nested Loop Left Join (cost=6.57..13,698.69 rows=106 width=1,221) (actual time=0.187..2,637.353 rows=70,986 loops=1)

6. 132.654 2,175.912 ↓ 669.7 70,986 1

Nested Loop Left Join (cost=6.14..13,338.94 rows=106 width=1,213) (actual time=0.178..2,175.912 rows=70,986 loops=1)

7. 148.838 1,830.300 ↓ 669.7 70,986 1

Nested Loop Left Join (cost=5.71..12,808.12 rows=106 width=1,029) (actual time=0.169..1,830.300 rows=70,986 loops=1)

8. 75.887 1,518.892 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=5.28..12,448.37 rows=106 width=1,021) (actual time=0.157..1,518.892 rows=32,514 loops=1)

9. 89.161 1,312.949 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=4.85..12,081.51 rows=106 width=837) (actual time=0.143..1,312.949 rows=32,514 loops=1)

10. 65.736 1,093.732 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=4.42..11,530.78 rows=106 width=829) (actual time=0.135..1,093.732 rows=32,514 loops=1)

11. 80.909 930.454 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=3.99..10,857.19 rows=106 width=645) (actual time=0.126..930.454 rows=32,514 loops=1)

12. 62.405 719.489 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=3.56..10,497.44 rows=106 width=637) (actual time=0.116..719.489 rows=32,514 loops=1)

13. 62.747 559.542 ↓ 306.7 32,514 1

Nested Loop Left Join (cost=3.14..9,966.62 rows=106 width=453) (actual time=0.105..559.542 rows=32,514 loops=1)

14. 43.579 422.325 ↓ 140.5 14,894 1

Nested Loop Left Join (cost=2.71..9,606.87 rows=106 width=445) (actual time=0.092..422.325 rows=14,894 loops=1)

15. 47.501 334.064 ↓ 140.5 14,894 1

Nested Loop Left Join (cost=2.28..9,241.15 rows=106 width=261) (actual time=0.082..334.064 rows=14,894 loops=1)

16. 40.861 226.987 ↓ 140.5 14,894 1

Nested Loop Left Join (cost=1.85..8,690.42 rows=106 width=253) (actual time=0.071..226.987 rows=14,894 loops=1)

17. 20.677 126.550 ↓ 140.5 14,894 1

Nested Loop (cost=1.43..8,345.84 rows=106 width=245) (actual time=0.061..126.550 rows=14,894 loops=1)

18. 0.005 0.034 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.57..16.62 rows=1 width=204) (actual time=0.027..0.034 rows=1 loops=1)

  • Join Filter: (period_attr.bo_instance_id = period_i.id)
19. 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=167) (actual time=0.017..0.020 rows=1 loops=1)

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

  • Index Cond: (bo_instance_id = 10963366)
21. 40.247 105.839 ↓ 140.5 14,894 1

Nested Loop (cost=0.86..8,328.16 rows=106 width=49) (actual time=0.030..105.839 rows=14,894 loops=1)

22. 20.910 20.910 ↓ 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.020..20.910 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)
23. 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=41) (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))
24. 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)
25. 59.576 59.576 ↑ 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.004 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)
26. 44.682 44.682 ↑ 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=192) (actual time=0.003..0.003 rows=1 loops=14,894)

  • Index Cond: (id = from_person_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
27. 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)
28. 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=192) (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)
29. 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)
30. 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=192) (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)
31. 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)
32. 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=192) (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)
33. 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)
34. 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=192) (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)
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=192) (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 : 5.907 ms
Execution time : 3,246.965 ms