explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nB48

Settings
# exclusive inclusive rows x rows loops node
1. 9.079 1,478.202 ↓ 135.7 3,528 1

Sort (cost=7,123.00..7,123.06 rows=26 width=209) (actual time=1,475.544..1,478.202 rows=3,528 loops=1)

  • Sort Key: kudos_i.ts_created DESC
  • Sort Method: quicksort Memory: 8057kB
2. 14.039 1,469.123 ↓ 135.7 3,528 1

Nested Loop Left Join (cost=168.37..7,122.39 rows=26 width=209) (actual time=0.382..1,469.123 rows=3,528 loops=1)

3. 9.648 798.876 ↓ 135.7 3,528 1

Nested Loop Left Join (cost=93.14..5,165.08 rows=26 width=153) (actual time=0.172..798.876 rows=3,528 loops=1)

4. 11.933 122.436 ↓ 135.7 3,528 1

Nested Loop Left Join (cost=17.91..3,208.29 rows=26 width=89) (actual time=0.087..122.436 rows=3,528 loops=1)

5. 10.388 50.527 ↓ 135.7 3,528 1

Nested Loop Left Join (cost=1.28..2,775.20 rows=26 width=65) (actual time=0.042..50.527 rows=3,528 loops=1)

6. 10.308 26.027 ↓ 135.7 3,528 1

Nested Loop (cost=0.86..2,761.01 rows=26 width=57) (actual time=0.033..26.027 rows=3,528 loops=1)

7. 5.135 5.135 ↓ 13.0 3,528 1

Index Scan using boi_rel_is_deleted_to_bo_instance_id_boc_rel_type_id_idx on boi_rel kudos_period_rel (cost=0.43..495.29 rows=272 width=16) (actual time=0.020..5.135 rows=3,528 loops=1)

  • Index Cond: ((is_deleted = false) AND (to_bo_instance_id = 6612983) AND (boc_rel_type_id = 15))
  • Filter: (NOT is_deleted)
8. 10.584 10.584 ↑ 1.0 1 3,528

Index Scan using bo_instance_pkey on bo_instance kudos_i (cost=0.43..8.33 rows=1 width=41) (actual time=0.003..0.003 rows=1 loops=3,528)

  • Index Cond: (id = kudos_period_rel.from_bo_instance_id)
  • Filter: ((NOT is_deleted) AND (tenant_id = 314))
9. 14.112 14.112 ↑ 1.0 1 3,528

Index Scan using idx_attrib_kudos_bo_instance_id on attrib_kudos attr_kudos (cost=0.42..0.54 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=3,528)

  • Index Cond: (bo_instance_id = kudos_i.id)
10. 21.168 59.976 ↑ 1.0 1 3,528

Aggregate (cost=16.63..16.64 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=3,528)

11. 14.112 38.808 ↑ 1.0 1 3,528

Nested Loop Left Join (cost=0.57..16.62 rows=1 width=204) (actual time=0.008..0.011 rows=1 loops=3,528)

  • Join Filter: (attr_period.bo_instance_id = period_i.id)
12. 14.112 14.112 ↑ 1.0 1 3,528

Index Scan using bo_instance_pkey on bo_instance period_i (cost=0.43..8.45 rows=1 width=167) (actual time=0.003..0.004 rows=1 loops=3,528)

  • Index Cond: (id = kudos_period_rel.to_bo_instance_id)
  • Filter: (NOT is_deleted)
13. 10.584 10.584 ↑ 1.0 1 3,528

Index Scan using idx_attrib_period_bo_instance_id on attrib_period attr_period (cost=0.14..8.16 rows=1 width=45) (actual time=0.002..0.003 rows=1 loops=3,528)

  • Index Cond: (bo_instance_id = kudos_period_rel.to_bo_instance_id)
14. 215.208 666.792 ↑ 1.0 1 3,528

Aggregate (cost=75.23..75.24 rows=1 width=64) (actual time=0.188..0.189 rows=1 loops=3,528)

15. 84.672 451.584 ↓ 2.1 15 3,528

Nested Loop Left Join (cost=1.71..75.16 rows=7 width=384) (actual time=0.022..0.128 rows=15 loops=3,528)

16. 14.112 42.336 ↑ 3.0 1 3,528

Nested Loop Left Join (cost=0.86..37.33 rows=3 width=200) (actual time=0.010..0.012 rows=1 loops=3,528)

17. 17.640 17.640 ↑ 3.0 1 3,528

Index Scan using boi_rel_is_deleted_to_bo_instance_id_boc_rel_type_id_idx on boi_rel person_kudos_giver_rel (cost=0.43..12.00 rows=3 width=8) (actual time=0.004..0.005 rows=1 loops=3,528)

  • Index Cond: ((is_deleted = false) AND (to_bo_instance_id = kudos_period_rel.from_bo_instance_id) AND (boc_rel_type_id = 32))
  • Filter: (NOT is_deleted)
18. 10.584 10.584 ↑ 1.0 1 3,528

Index Scan using bo_instance_pkey on bo_instance giver_i (cost=0.43..8.45 rows=1 width=192) (actual time=0.003..0.003 rows=1 loops=3,528)

  • Index Cond: (id = person_kudos_giver_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
19. 102.693 324.576 ↓ 15.0 15 3,528

Nested Loop Left Join (cost=0.86..12.60 rows=1 width=200) (actual time=0.009..0.092 rows=15 loops=3,528)

20. 63.504 63.504 ↓ 15.0 15 3,528

Index Scan using boi_rel_boc_rel_type_id_from_bo_instance_id_idx on boi_rel giver_team_rel (cost=0.43..8.45 rows=1 width=16) (actual time=0.004..0.018 rows=15 loops=3,528)

  • Index Cond: ((boc_rel_type_id = 31) AND (from_bo_instance_id = person_kudos_giver_rel.from_bo_instance_id))
  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 0
21. 158.379 158.379 ↑ 1.0 1 52,793

Index Scan using bo_instance_pkey on bo_instance giver_team_i (cost=0.43..4.15 rows=1 width=192) (actual time=0.003..0.003 rows=1 loops=52,793)

  • Index Cond: (id = giver_team_rel.to_bo_instance_id)
  • Filter: (NOT is_deleted)
22. 194.040 656.208 ↑ 1.0 1 3,528

Aggregate (cost=75.23..75.25 rows=1 width=64) (actual time=0.186..0.186 rows=1 loops=3,528)

23. 84.672 462.168 ↓ 2.1 15 3,528

Nested Loop Left Join (cost=1.71..75.16 rows=7 width=384) (actual time=0.025..0.131 rows=15 loops=3,528)

24. 10.584 45.864 ↑ 3.0 1 3,528

Nested Loop Left Join (cost=0.86..37.33 rows=3 width=200) (actual time=0.011..0.013 rows=1 loops=3,528)

25. 17.640 17.640 ↑ 3.0 1 3,528

Index Scan using boi_rel_is_deleted_to_bo_instance_id_boc_rel_type_id_idx on boi_rel person_kudos_receiver_rel (cost=0.43..12.00 rows=3 width=8) (actual time=0.004..0.005 rows=1 loops=3,528)

  • Index Cond: ((is_deleted = false) AND (to_bo_instance_id = kudos_period_rel.from_bo_instance_id) AND (boc_rel_type_id = 33))
  • Filter: (NOT is_deleted)
26. 17.640 17.640 ↑ 1.0 1 3,528

Index Scan using bo_instance_pkey on bo_instance receiver_i (cost=0.43..8.45 rows=1 width=192) (actual time=0.005..0.005 rows=1 loops=3,528)

  • Index Cond: (id = person_kudos_receiver_rel.from_bo_instance_id)
  • Filter: (NOT is_deleted)
27. 102.678 331.632 ↓ 15.0 15 3,528

Nested Loop Left Join (cost=0.86..12.60 rows=1 width=200) (actual time=0.011..0.094 rows=15 loops=3,528)

28. 70.560 70.560 ↓ 15.0 15 3,528

Index Scan using boi_rel_boc_rel_type_id_from_bo_instance_id_idx on boi_rel receiver_team_rel (cost=0.43..8.45 rows=1 width=16) (actual time=0.005..0.020 rows=15 loops=3,528)

  • Index Cond: ((boc_rel_type_id = 31) AND (from_bo_instance_id = person_kudos_receiver_rel.from_bo_instance_id))
  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 0
29. 158.394 158.394 ↑ 1.0 1 52,798

Index Scan using bo_instance_pkey on bo_instance receiver_team_i (cost=0.43..4.15 rows=1 width=192) (actual time=0.003..0.003 rows=1 loops=52,798)

  • Index Cond: (id = receiver_team_rel.to_bo_instance_id)
  • Filter: (NOT is_deleted)
Planning time : 2.405 ms
Execution time : 1,480.555 ms