explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uq3T

Settings
# exclusive inclusive rows x rows loops node
1. 4.580 47.223 ↑ 230.3 57 1

Unique (cost=6,388.58..6,716.78 rows=13,128 width=314) (actual time=29.965..47.223 rows=57 loops=1)

2. 25.122 42.643 ↑ 1.2 11,036 1

Sort (cost=6,388.58..6,421.40 rows=13,128 width=314) (actual time=29.965..42.643 rows=11,036 loops=1)

  • Sort Key: a.id, a.code, a.created_at, aa.name, (COALESCE(lec.name, (concat_ws(' '::text, ic.first_name, ic.last_name))::character varying)), s.name, u.full_name, s.id, aa.id
  • Sort Method: external merge Disk: 984kB
3. 4.873 17.521 ↑ 1.2 11,036 1

Hash Left Join (cost=54.44..1,626.60 rows=13,128 width=314) (actual time=1.004..17.521 rows=11,036 loops=1)

  • Hash Cond: (c.id = cmb.committee_id)
  • Filter: ((a.created_by_id = 1) OR (ltmb.user_id = 1) OR (cmb.user_id = 1))
  • Rows Removed by Filter: 18196
4. 9.651 12.639 ↑ 1.8 7,920 1

Nested Loop Left Join (cost=53.15..1,028.77 rows=14,093 width=321) (actual time=0.975..12.639 rows=7,920 loops=1)

  • Join Filter: ((c.id = t.committee_id) OR ((c.branch_id = a.branch_id) AND (c.branch_id <> 1)))
  • Rows Removed by Join Filter: 56182
5. 1.868 2.988 ↓ 1.3 7,920 1

Hash Right Join (cost=53.15..145.96 rows=6,298 width=325) (actual time=0.962..2.988 rows=7,920 loops=1)

  • Hash Cond: (t.application_id = a.id)
6. 0.180 0.180 ↓ 1.0 889 1

Seq Scan on timeline t (cost=0.00..19.86 rows=886 width=8) (actual time=0.008..0.180 rows=889 loops=1)

7. 0.227 0.940 ↓ 1.2 690 1

Hash (cost=45.78..45.78 rows=590 width=321) (actual time=0.940..0.940 rows=690 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 95kB
8. 0.135 0.713 ↓ 1.2 690 1

Hash Left Join (cost=27.69..45.78 rows=590 width=321) (actual time=0.306..0.713 rows=690 loops=1)

  • Hash Cond: (lt.id = ltmb.lsm_team_id)
9. 0.121 0.571 ↓ 1.1 438 1

Hash Left Join (cost=26.49..35.73 rows=393 width=321) (actual time=0.285..0.571 rows=438 loops=1)

  • Hash Cond: (ltcf.lsm_team_id = lt.id)
  • Join Filter: ((lt.branch_id = 1) OR (lt.branch_id = a.branch_id))
  • Rows Removed by Join Filter: 250
10. 0.085 0.443 ↓ 1.1 438 1

Hash Left Join (cost=25.35..32.77 rows=393 width=321) (actual time=0.264..0.443 rows=438 loops=1)

  • Hash Cond: (a.appraisal_id = ltcf.appraisal_id)
11. 0.030 0.344 ↓ 1.0 84 1

Hash Join (cost=23.90..26.66 rows=83 width=321) (actual time=0.239..0.344 rows=84 loops=1)

  • Hash Cond: (a.appraisal_id = aa.id)
12. 0.032 0.307 ↓ 1.0 84 1

Hash Join (cost=10.30..12.83 rows=83 width=99) (actual time=0.221..0.307 rows=84 loops=1)

  • Hash Cond: (a.created_by_id = u.id)
13. 0.035 0.251 ↓ 1.0 84 1

Hash Join (cost=8.92..11.18 rows=83 width=86) (actual time=0.185..0.251 rows=84 loops=1)

  • Hash Cond: (a.status_id = s.id)
14. 0.024 0.203 ↓ 1.0 84 1

Hash Left Join (cost=7.47..9.47 rows=83 width=72) (actual time=0.157..0.203 rows=84 loops=1)

  • Hash Cond: (a.id = able.application_id)
15. 0.034 0.145 ↓ 1.0 84 1

Hash Right Join (cost=5.27..6.95 rows=83 width=56) (actual time=0.113..0.145 rows=84 loops=1)

  • Hash Cond: (abi.application_id = a.id)
16. 0.026 0.058 ↓ 1.2 12 1

Hash Right Join (cost=1.41..3.06 rows=10 width=15) (actual time=0.044..0.058 rows=12 loops=1)

  • Hash Cond: (ic.id = abi.individual_customer_id)
17. 0.018 0.018 ↓ 1.2 47 1

Seq Scan on individual_customer ic (cost=0.00..1.40 rows=40 width=15) (actual time=0.015..0.018 rows=47 loops=1)

18. 0.005 0.014 ↓ 1.2 12 1

Hash (cost=1.28..1.28 rows=10 width=8) (actual time=0.014..0.014 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
19. 0.009 0.009 ↓ 1.2 12 1

Seq Scan on application_borrower_individual abi (cost=0.00..1.28 rows=10 width=8) (actual time=0.006..0.009 rows=12 loops=1)

  • Filter: is_main
  • Rows Removed by Filter: 20
20. 0.021 0.053 ↓ 1.0 84 1

Hash (cost=2.83..2.83 rows=83 width=45) (actual time=0.053..0.053 rows=84 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
21. 0.032 0.032 ↓ 1.0 84 1

Seq Scan on application a (cost=0.00..2.83 rows=83 width=45) (actual time=0.007..0.032 rows=84 loops=1)

22. 0.003 0.034 ↑ 1.0 1 1

Hash (cost=2.18..2.18 rows=1 width=20) (actual time=0.034..0.034 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
23. 0.015 0.031 ↑ 1.0 1 1

Hash Right Join (cost=1.02..2.18 rows=1 width=20) (actual time=0.027..0.031 rows=1 loops=1)

  • Hash Cond: (lec.id = able.legal_entity_customer_id)
24. 0.007 0.007 ↓ 1.2 13 1

Seq Scan on legal_entity_customer lec (cost=0.00..1.11 rows=11 width=20) (actual time=0.006..0.007 rows=13 loops=1)

25. 0.005 0.009 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on application_borrower_legal_entity able (cost=0.00..1.01 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: is_main
27. 0.006 0.013 ↑ 1.0 20 1

Hash (cost=1.20..1.20 rows=20 width=18) (actual time=0.013..0.013 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
28. 0.007 0.007 ↑ 1.0 20 1

Seq Scan on status s (cost=0.00..1.20 rows=20 width=18) (actual time=0.005..0.007 rows=20 loops=1)

29. 0.010 0.024 ↓ 1.1 18 1

Hash (cost=1.17..1.17 rows=17 width=17) (actual time=0.024..0.024 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.014 0.014 ↓ 1.1 18 1

Seq Scan on "user" u (cost=0.00..1.17 rows=17 width=17) (actual time=0.012..0.014 rows=18 loops=1)

31. 0.003 0.007 ↑ 32.0 5 1

Hash (cost=11.60..11.60 rows=160 width=222) (actual time=0.007..0.007 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.004 0.004 ↑ 32.0 5 1

Seq Scan on appraisal aa (cost=0.00..11.60 rows=160 width=222) (actual time=0.003..0.004 rows=5 loops=1)

33. 0.005 0.014 ↓ 1.2 24 1

Hash (cost=1.20..1.20 rows=20 width=8) (actual time=0.014..0.014 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
34. 0.009 0.009 ↓ 1.2 24 1

Seq Scan on lsm_team_config ltcf (cost=0.00..1.20 rows=20 width=8) (actual time=0.007..0.009 rows=24 loops=1)

35. 0.003 0.007 ↓ 1.5 9 1

Hash (cost=1.06..1.06 rows=6 width=8) (actual time=0.007..0.007 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
36. 0.004 0.004 ↓ 1.5 9 1

Seq Scan on lsm_team lt (cost=0.00..1.06 rows=6 width=8) (actual time=0.003..0.004 rows=9 loops=1)

37. 0.003 0.007 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=8) (actual time=0.007..0.007 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
38. 0.004 0.004 ↑ 1.0 9 1

Seq Scan on lsm_team_member ltmb (cost=0.00..1.09 rows=9 width=8) (actual time=0.003..0.004 rows=9 loops=1)

39. 0.000 0.000 ↓ 1.1 8 7,920

Materialize (cost=0.00..1.10 rows=7 width=8) (actual time=0.000..0.000 rows=8 loops=7,920)

40. 0.004 0.004 ↓ 1.1 8 1

Seq Scan on committee c (cost=0.00..1.07 rows=7 width=8) (actual time=0.003..0.004 rows=8 loops=1)

41. 0.004 0.009 ↓ 1.3 17 1

Hash (cost=1.13..1.13 rows=13 width=8) (actual time=0.009..0.009 rows=17 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
42. 0.005 0.005 ↓ 1.3 17 1

Seq Scan on committee_member cmb (cost=0.00..1.13 rows=13 width=8) (actual time=0.004..0.005 rows=17 loops=1)

Planning time : 3.695 ms
Execution time : 49.988 ms