explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0quU

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 30.810 ↑ 1.0 15 1

Limit (cost=2,700.58..2,701.07 rows=15 width=317) (actual time=26.186..30.810 rows=15 loops=1)

2. 1.199 30.801 ↑ 582.7 15 1

Unique (cost=2,700.58..2,897.23 rows=8,740 width=317) (actual time=26.185..30.801 rows=15 loops=1)

3. 15.459 29.602 ↑ 2.2 4,009 1

Sort (cost=2,700.58..2,722.43 rows=8,740 width=317) (actual time=26.185..29.602 rows=4,009 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
4. 4.401 14.143 ↓ 1.4 12,025 1

Hash Left Join (cost=53.83..840.40 rows=8,740 width=317) (actual time=0.866..14.143 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
5. 7.130 9.732 ↓ 1.0 7,439 1

Nested Loop Left Join (cost=52.58..540.76 rows=7,214 width=324) (actual time=0.838..9.732 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
6. 1.630 2.602 ↓ 2.1 7,439 1

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

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

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

8. 0.216 0.803 ↓ 1.9 624 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 87kB
9. 0.122 0.587 ↓ 1.9 624 1

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

  • Hash Cond: (lt.id = ltmb.lsm_team_id)
10. 0.092 0.454 ↑ 1.0 324 1

Hash Left Join (cost=35.89..44.62 rows=325 width=324) (actual time=0.221..0.454 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
11. 0.069 0.354 ↑ 1.0 324 1

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

  • Hash Cond: (a.appraisal_id = ltcf.appraisal_id)
12. 0.026 0.272 ↑ 1.0 68 1

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

  • Hash Cond: (a.appraisal_id = aa.id)
13. 0.025 0.235 ↑ 1.0 68 1

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

  • Hash Cond: (a.created_by_id = u.id)
14. 0.025 0.189 ↑ 1.0 68 1

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

  • Hash Cond: (a.status_id = s.id)
15. 0.024 0.149 ↑ 1.0 68 1

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

  • Hash Cond: (a.id = abi.application_id)
16. 0.022 0.084 ↑ 1.0 68 1

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

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

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

18. 0.003 0.030 ↓ 2.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
19. 0.015 0.027 ↓ 2.0 2 1

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

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

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

21. 0.003 0.007 ↓ 2.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.004 0.004 ↓ 2.0 2 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=2 loops=1)

  • Filter: is_main
23. 0.004 0.041 ↓ 2.7 8 1

Hash (cost=2.74..2.74 rows=3 width=15) (actual time=0.041..0.041 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
24. 0.015 0.037 ↓ 2.7 8 1

Hash Right Join (cost=1.27..2.74 rows=3 width=15) (actual time=0.029..0.037 rows=8 loops=1)

  • Hash Cond: (ic.id = abi.individual_customer_id)
25. 0.007 0.007 ↓ 1.1 36 1

Seq Scan on individual_customer ic (cost=0.00..1.32 rows=32 width=15) (actual time=0.005..0.007 rows=36 loops=1)

26. 0.006 0.015 ↓ 2.7 8 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
27. 0.009 0.009 ↓ 2.7 8 1

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

  • Filter: is_main
  • Rows Removed by Filter: 18
28. 0.009 0.015 ↑ 1.0 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
29. 0.006 0.006 ↑ 1.0 20 1

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

30. 0.008 0.021 ↓ 1.2 14 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.013 0.013 ↓ 1.2 14 1

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

32. 0.007 0.011 ↑ 32.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
33. 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)

34. 0.006 0.013 ↑ 1.0 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
35. 0.007 0.007 ↑ 1.0 20 1

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

36. 0.003 0.008 ↑ 23.3 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
37. 0.005 0.005 ↑ 23.3 6 1

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

38. 0.005 0.011 ↑ 1.0 10 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
39. 0.006 0.006 ↑ 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.006 rows=10 loops=1)

40. 0.000 0.000 ↑ 1.0 6 7,439

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

41. 0.004 0.004 ↑ 1.0 6 1

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

42. 0.004 0.010 ↑ 1.0 11 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
43. 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 : 8.330 ms
Execution time : 33.465 ms