explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tnMe

Settings
# exclusive inclusive rows x rows loops node
1. 5.723 63.710 ↑ 128.5 68 1

Unique (cost=2,700.58..2,897.23 rows=8,740 width=317) (actual time=45.236..63.710 rows=68 loops=1)

2. 32.865 57.987 ↓ 1.4 12,025 1

Sort (cost=2,700.58..2,722.43 rows=8,740 width=317) (actual time=45.234..57.987 rows=12,025 loops=1)

  • Sort Key: a.id DESC, a.code, a.created_at, aa.name, a.const_borrower_type, (COALESCE(lec.name, (concat_ws(' '::text, ic.first_name, ic.last_name))::character varying)), s.name, u.full_name
  • Sort Method: external merge Disk: 1088kB
3. 7.824 25.122 ↓ 1.4 12,025 1

Hash Left Join (cost=53.83..840.40 rows=8,740 width=317) (actual time=1.449..25.122 rows=12,025 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: 8928
4. 5.364 17.287 ↓ 1.0 7,439 1

Nested Loop Left Join (cost=52.58..540.76 rows=7,214 width=324) (actual time=1.420..17.287 rows=7,439 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: 37877
5. 2.869 4.484 ↓ 2.1 7,439 1

Hash Right Join (cost=52.58..111.29 rows=3,570 width=328) (actual time=1.399..4.484 rows=7,439 loops=1)

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

Seq Scan on timeline t (cost=0.00..16.47 rows=747 width=8) (actual time=0.014..0.245 rows=752 loops=1)

7. 0.308 1.370 ↓ 1.9 624 1

Hash (cost=48.52..48.52 rows=325 width=324) (actual time=1.370..1.370 rows=624 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 87kB
8. 0.192 1.062 ↓ 1.9 624 1

Hash Left Join (cost=37.12..48.52 rows=325 width=324) (actual time=0.483..1.062 rows=624 loops=1)

  • Hash Cond: (lt.id = ltmb.lsm_team_id)
9. 0.178 0.858 ↑ 1.0 324 1

Hash Left Join (cost=35.89..44.62 rows=325 width=324) (actual time=0.459..0.858 rows=324 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: 174
10. 0.132 0.665 ↑ 1.0 324 1

Hash Left Join (cost=22.74..30.62 rows=325 width=324) (actual time=0.402..0.665 rows=324 loops=1)

  • Hash Cond: (a.appraisal_id = ltcf.appraisal_id)
11. 0.054 0.512 ↑ 1.0 68 1

Hash Join (cost=21.29..25.33 rows=68 width=324) (actual time=0.347..0.512 rows=68 loops=1)

  • Hash Cond: (a.appraisal_id = aa.id)
12. 0.040 0.443 ↑ 1.0 68 1

Hash Join (cost=7.69..11.55 rows=68 width=106) (actual time=0.303..0.443 rows=68 loops=1)

  • Hash Cond: (a.created_by_id = u.id)
13. 0.039 0.371 ↑ 1.0 68 1

Hash Join (cost=6.42..10.03 rows=68 width=93) (actual time=0.257..0.371 rows=68 loops=1)

  • Hash Cond: (a.status_id = s.id)
14. 0.047 0.315 ↑ 1.0 68 1

Hash Left Join (cost=4.97..8.37 rows=68 width=83) (actual time=0.225..0.315 rows=68 loops=1)

  • Hash Cond: (a.id = abi.application_id)
15. 0.039 0.179 ↑ 1.0 68 1

Hash Left Join (cost=2.20..5.14 rows=68 width=72) (actual time=0.111..0.179 rows=68 loops=1)

  • Hash Cond: (a.id = able.application_id)
16. 0.058 0.058 ↑ 1.0 68 1

Seq Scan on application a (cost=0.00..2.68 rows=68 width=56) (actual time=0.009..0.058 rows=68 loops=1)

17. 0.007 0.082 ↓ 2.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.046 0.075 ↓ 2.0 2 1

Hash Right Join (cost=1.02..2.18 rows=1 width=20) (actual time=0.067..0.075 rows=2 loops=1)

  • Hash Cond: (lec.id = able.legal_entity_customer_id)
19. 0.007 0.007 ↓ 1.3 14 1

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

20. 0.008 0.022 ↓ 2.0 2 1

Hash (cost=1.01..1.01 rows=1 width=8) (actual time=0.021..0.022 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.014 0.014 ↓ 2.0 2 1

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

  • Filter: is_main
22. 0.009 0.089 ↓ 3.0 9 1

Hash (cost=2.74..2.74 rows=3 width=15) (actual time=0.089..0.089 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
23. 0.038 0.080 ↓ 3.0 9 1

Hash Right Join (cost=1.27..2.74 rows=3 width=15) (actual time=0.065..0.080 rows=9 loops=1)

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

Seq Scan on individual_customer ic (cost=0.00..1.32 rows=32 width=15) (actual time=0.014..0.018 rows=37 loops=1)

25. 0.012 0.024 ↓ 3.0 9 1

Hash (cost=1.23..1.23 rows=3 width=8) (actual time=0.024..0.024 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.012 0.012 ↓ 3.0 9 1

Seq Scan on application_borrower_individual abi (cost=0.00..1.23 rows=3 width=8) (actual time=0.008..0.012 rows=9 loops=1)

  • Filter: is_main
  • Rows Removed by Filter: 18
27. 0.007 0.017 ↑ 1.0 20 1

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

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

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

29. 0.013 0.032 ↓ 1.2 14 1

Hash (cost=1.12..1.12 rows=12 width=17) (actual time=0.031..0.032 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.019 0.019 ↓ 1.2 14 1

Seq Scan on "user" u (cost=0.00..1.12 rows=12 width=17) (actual time=0.015..0.019 rows=14 loops=1)

31. 0.009 0.015 ↑ 32.0 5 1

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

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

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

33. 0.011 0.021 ↑ 1.0 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
34. 0.010 0.010 ↑ 1.0 20 1

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

35. 0.008 0.015 ↑ 23.3 6 1

Hash (cost=11.40..11.40 rows=140 width=8) (actual time=0.015..0.015 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
36. 0.007 0.007 ↑ 23.3 6 1

Seq Scan on lsm_team lt (cost=0.00..11.40 rows=140 width=8) (actual time=0.006..0.007 rows=6 loops=1)

37. 0.005 0.012 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=8) (actual time=0.012..0.012 rows=10 loops=1)

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

Seq Scan on lsm_team_member ltmb (cost=0.00..1.10 rows=10 width=8) (actual time=0.005..0.007 rows=10 loops=1)

39. 7.432 7.439 ↑ 1.0 6 7,439

Materialize (cost=0.00..1.09 rows=6 width=8) (actual time=0.000..0.001 rows=6 loops=7,439)

40. 0.007 0.007 ↑ 1.0 6 1

Seq Scan on committee c (cost=0.00..1.06 rows=6 width=8) (actual time=0.006..0.007 rows=6 loops=1)

41. 0.005 0.011 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=8) (actual time=0.011..0.011 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
42. 0.006 0.006 ↑ 1.0 11 1

Seq Scan on committee_member cmb (cost=0.00..1.11 rows=11 width=8) (actual time=0.005..0.006 rows=11 loops=1)

Planning time : 5.963 ms
Execution time : 66.439 ms