explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nWw9

Settings
# exclusive inclusive rows x rows loops node
1. 1.189 119.108 ↓ 1.1 769 1

Merge Left Join (cost=2,064.83..2,237.98 rows=700 width=868) (actual time=85.448..119.108 rows=769 loops=1)

  • Merge Cond: (a.id = _t_4.application_id)
2. 1.152 112.644 ↓ 1.1 769 1

Merge Left Join (cost=1,871.44..2,027.76 rows=700 width=673) (actual time=81.354..112.644 rows=769 loops=1)

  • Merge Cond: (a.id = _t_3.application_id)
3. 1.450 104.674 ↓ 1.1 769 1

Merge Left Join (cost=1,674.02..1,808.78 rows=700 width=659) (actual time=76.361..104.674 rows=769 loops=1)

  • Merge Cond: (a.id = _t_2.application_id)
4. 1.383 75.921 ↓ 1.1 769 1

Merge Left Join (cost=1,136.15..1,223.86 rows=700 width=651) (actual time=57.346..75.921 rows=769 loops=1)

  • Merge Cond: (a.id = _t_1.application_id)
5. 1.931 55.231 ↓ 1.1 769 1

Merge Join (cost=764.95..817.54 rows=700 width=639) (actual time=43.112..55.231 rows=769 loops=1)

  • Merge Cond: (a.id = _t.application_id)
6. 1.618 15.082 ↓ 1.1 771 1

Sort (cost=174.13..175.91 rows=713 width=612) (actual time=14.477..15.082 rows=771 loops=1)

  • Sort Key: a.id DESC
  • Sort Method: quicksort Memory: 144kB
7. 1.065 13.464 ↓ 1.1 785 1

Hash Join (cost=104.49..140.34 rows=713 width=612) (actual time=5.392..13.464 rows=785 loops=1)

  • Hash Cond: (a.created_by_id = lo.id)
8. 0.979 12.096 ↓ 1.1 785 1

Hash Left Join (cost=98.74..132.66 rows=713 width=604) (actual time=5.056..12.096 rows=785 loops=1)

  • Hash Cond: (at.id = attd.application_term_id)
9. 1.031 10.827 ↓ 1.1 768 1

Hash Left Join (cost=92.94..117.17 rows=713 width=582) (actual time=4.723..10.827 rows=768 loops=1)

  • Hash Cond: (at.nature_request_id = atnr.id)
10. 0.996 9.674 ↓ 1.1 768 1

Hash Left Join (cost=90.77..112.97 rows=713 width=569) (actual time=4.569..9.674 rows=768 loops=1)

  • Hash Cond: (at.loan_type_id = atlt.id)
11. 1.014 8.627 ↓ 1.1 768 1

Hash Join (cost=73.57..93.87 rows=713 width=355) (actual time=4.483..8.627 rows=768 loops=1)

  • Hash Cond: (a.appraisal_id = aa.id)
12. 1.019 7.577 ↓ 1.1 768 1

Hash Join (cost=60.20..78.57 rows=713 width=141) (actual time=4.415..7.577 rows=768 loops=1)

  • Hash Cond: (a.branch_id = b.id)
13. 0.992 6.394 ↓ 1.1 768 1

Hash Left Join (cost=57.46..73.87 rows=713 width=119) (actual time=4.223..6.394 rows=768 loops=1)

  • Hash Cond: (a.id = _able.application_id)
14. 0.840 5.240 ↓ 1.1 768 1

Hash Right Join (cost=54.84..68.49 rows=713 width=92) (actual time=4.038..5.240 rows=768 loops=1)

  • Hash Cond: (at.application_id = a.id)
15. 0.409 0.409 ↑ 1.0 295 1

Seq Scan on application_term at (cost=0.00..9.58 rows=296 width=25) (actual time=0.023..0.409 rows=295 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 57
16. 0.687 3.991 ↓ 1.0 715 1

Hash (cost=45.93..45.93 rows=713 width=71) (actual time=3.990..3.991 rows=715 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 56kB
17. 0.674 3.304 ↓ 1.0 715 1

Hash Right Join (cost=39.12..45.93 rows=713 width=71) (actual time=2.326..3.304 rows=715 loops=1)

  • Hash Cond: (_abi.application_id = a.id)
18. 0.253 0.950 ↑ 1.9 132 1

Hash Join (cost=12.07..18.24 rows=248 width=44) (actual time=0.617..0.950 rows=132 loops=1)

  • Hash Cond: (_abi.individual_customer_id = _ic.id)
19. 0.139 0.139 ↑ 1.9 132 1

Seq Scan on application_borrower_individual _abi (cost=0.00..5.50 rows=248 width=8) (actual time=0.028..0.139 rows=132 loops=1)

  • Filter: is_main
  • Rows Removed by Filter: 51
20. 0.217 0.558 ↑ 1.3 212 1

Hash (cost=8.54..8.54 rows=283 width=44) (actual time=0.556..0.558 rows=212 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
21. 0.341 0.341 ↑ 1.3 212 1

Seq Scan on individual_customer _ic (cost=0.00..8.54 rows=283 width=44) (actual time=0.032..0.341 rows=212 loops=1)

22. 0.749 1.680 ↓ 1.0 715 1

Hash (cost=18.13..18.13 rows=713 width=31) (actual time=1.679..1.680 rows=715 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 54kB
23. 0.931 0.931 ↓ 1.0 715 1

Seq Scan on application a (cost=0.00..18.13 rows=713 width=31) (actual time=0.017..0.931 rows=715 loops=1)

24. 0.014 0.162 ↑ 1.0 8 1

Hash (cost=2.52..2.52 rows=8 width=31) (actual time=0.161..0.162 rows=8 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
25. 0.073 0.148 ↑ 1.0 8 1

Hash Join (cost=1.18..2.52 rows=8 width=31) (actual time=0.099..0.148 rows=8 loops=1)

  • Hash Cond: (_lec.id = _able.legal_entity_customer_id)
26. 0.039 0.039 ↓ 1.5 29 1

Seq Scan on legal_entity_customer _lec (cost=0.00..1.19 rows=19 width=31) (actual time=0.018..0.039 rows=29 loops=1)

27. 0.019 0.036 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=8) (actual time=0.035..0.036 rows=8 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
28. 0.017 0.017 ↑ 1.0 8 1

Seq Scan on application_borrower_legal_entity _able (cost=0.00..1.08 rows=8 width=8) (actual time=0.011..0.017 rows=8 loops=1)

  • Filter: is_main
29. 0.089 0.164 ↓ 1.0 80 1

Hash (cost=1.77..1.77 rows=77 width=30) (actual time=0.163..0.164 rows=80 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
30. 0.075 0.075 ↓ 1.0 80 1

Seq Scan on branch b (cost=0.00..1.77 rows=77 width=30) (actual time=0.017..0.075 rows=80 loops=1)

31. 0.011 0.036 ↑ 30.0 5 1

Hash (cost=11.50..11.50 rows=150 width=222) (actual time=0.036..0.036 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
32. 0.025 0.025 ↑ 30.0 5 1

Seq Scan on appraisal aa (cost=0.00..11.50 rows=150 width=222) (actual time=0.021..0.025 rows=5 loops=1)

33. 0.024 0.051 ↑ 29.1 11 1

Hash (cost=13.20..13.20 rows=320 width=222) (actual time=0.051..0.051 rows=11 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
34. 0.027 0.027 ↑ 29.1 11 1

Seq Scan on loan_type atlt (cost=0.00..13.20 rows=320 width=222) (actual time=0.016..0.027 rows=11 loops=1)

35. 0.064 0.122 ↓ 1.3 66 1

Hash (cost=1.52..1.52 rows=52 width=21) (actual time=0.122..0.122 rows=66 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
36. 0.058 0.058 ↓ 1.3 66 1

Seq Scan on nature_request atnr (cost=0.00..1.52 rows=52 width=21) (actual time=0.010..0.058 rows=66 loops=1)

37. 0.119 0.290 ↑ 1.3 86 1

Hash (cost=4.40..4.40 rows=112 width=30) (actual time=0.289..0.290 rows=86 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
38. 0.171 0.171 ↓ 1.1 121 1

Seq Scan on timeline_disbursement attd (cost=0.00..4.40 rows=112 width=30) (actual time=0.024..0.171 rows=121 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 33
39. 0.141 0.303 ↑ 1.0 122 1

Hash (cost=4.22..4.22 rows=122 width=16) (actual time=0.303..0.303 rows=122 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
40. 0.162 0.162 ↑ 1.0 122 1

Seq Scan on "user" lo (cost=0.00..4.22 rows=122 width=16) (actual time=0.041..0.162 rows=122 loops=1)

41. 4.603 38.218 ↓ 1.0 704 1

Unique (cost=590.82..624.09 rows=700 width=35) (actual time=28.603..38.218 rows=704 loops=1)

42. 17.224 33.615 ↓ 1.0 6,703 1

Sort (cost=590.82..607.46 rows=6,655 width=35) (actual time=28.599..33.615 rows=6,703 loops=1)

  • Sort Key: _t.application_id DESC, _t.id DESC
  • Sort Method: external merge Disk: 336kB
43. 9.369 16.391 ↓ 1.0 6,703 1

Hash Join (cost=1.65..168.22 rows=6,655 width=35) (actual time=0.096..16.391 rows=6,703 loops=1)

  • Hash Cond: (_t.status_id = _s.id)
44. 6.965 6.965 ↓ 1.0 6,703 1

Seq Scan on timeline _t (cost=0.00..146.55 rows=6,655 width=20) (actual time=0.017..6.965 rows=6,703 loops=1)

45. 0.032 0.057 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=23) (actual time=0.056..0.057 rows=29 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
46. 0.025 0.025 ↑ 1.0 29 1

Seq Scan on status _s (cost=0.00..1.29 rows=29 width=23) (actual time=0.008..0.025 rows=29 loops=1)

47. 2.472 19.307 ↑ 2.1 328 1

Unique (cost=371.20..388.95 rows=700 width=20) (actual time=14.221..19.307 rows=328 loops=1)

48. 7.074 16.835 ↓ 1.0 3,584 1

Sort (cost=371.20..380.07 rows=3,551 width=20) (actual time=14.217..16.835 rows=3,584 loops=1)

  • Sort Key: _t_1.application_id DESC, _t_1.id DESC
  • Sort Method: quicksort Memory: 377kB
49. 5.263 9.761 ↓ 1.0 3,584 1

Hash Join (cost=5.75..161.79 rows=3,551 width=20) (actual time=0.317..9.761 rows=3,584 loops=1)

  • Hash Cond: (_t_1.lsm_team_reviewer_id = _r.id)
50. 4.227 4.227 ↓ 1.0 3,584 1

Seq Scan on timeline _t_1 (cost=0.00..146.55 rows=3,551 width=12) (actual time=0.026..4.227 rows=3,584 loops=1)

  • Filter: (lsm_team_reviewer_id IS NOT NULL)
  • Rows Removed by Filter: 3,119
51. 0.127 0.271 ↑ 1.0 122 1

Hash (cost=4.22..4.22 rows=122 width=16) (actual time=0.271..0.271 rows=122 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
52. 0.144 0.144 ↑ 1.0 122 1

Seq Scan on "user" _r (cost=0.00..4.22 rows=122 width=16) (actual time=0.023..0.144 rows=122 loops=1)

53. 4.078 27.303 ↑ 1.6 436 1

Unique (cost=537.88..567.55 rows=700 width=16) (actual time=18.993..27.303 rows=436 loops=1)

54. 11.370 23.225 ↓ 1.0 5,978 1

Sort (cost=537.88..552.72 rows=5,935 width=16) (actual time=18.987..23.225 rows=5,978 loops=1)

  • Sort Key: _t_2.application_id DESC, _t_2.id DESC
  • Sort Method: quicksort Memory: 505kB
55. 7.083 11.855 ↓ 1.0 5,979 1

Hash Join (cost=3.16..165.90 rows=5,935 width=16) (actual time=0.201..11.855 rows=5,979 loops=1)

  • Hash Cond: (_t_2.committee_id = _c.id)
56. 4.613 4.613 ↓ 1.0 5,979 1

Seq Scan on timeline _t_2 (cost=0.00..146.55 rows=5,935 width=12) (actual time=0.024..4.613 rows=5,979 loops=1)

  • Filter: (committee_id IS NOT NULL)
  • Rows Removed by Filter: 724
57. 0.078 0.159 ↑ 1.0 96 1

Hash (cost=1.96..1.96 rows=96 width=12) (actual time=0.159..0.159 rows=96 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
58. 0.081 0.081 ↑ 1.0 96 1

Seq Scan on committee _c (cost=0.00..1.96 rows=96 width=12) (actual time=0.025..0.081 rows=96 loops=1)

59. 0.899 6.818 ↑ 4.1 146 1

Unique (cost=197.42..203.73 rows=605 width=22) (actual time=4.981..6.818 rows=146 loops=1)

60. 2.454 5.919 ↓ 1.0 1,282 1

Sort (cost=197.42..200.57 rows=1,262 width=22) (actual time=4.977..5.919 rows=1,282 loops=1)

  • Sort Key: _t_3.application_id DESC, _t_3.id DESC
  • Sort Method: quicksort Memory: 149kB
61. 1.695 3.465 ↓ 1.0 1,282 1

Hash Join (cost=36.04..132.42 rows=1,262 width=22) (actual time=0.312..3.465 rows=1,282 loops=1)

  • Hash Cond: (_t_3.disbursement_team_id = _dbmt.id)
62. 1.517 1.696 ↓ 1.0 1,282 1

Bitmap Heap Scan on timeline _t_3 (cost=34.90..127.52 rows=1,262 width=12) (actual time=0.212..1.696 rows=1,282 loops=1)

  • Recheck Cond: (disbursement_team_id IS NOT NULL)
  • Heap Blocks: exact=62
63. 0.179 0.179 ↓ 1.0 1,282 1

Bitmap Index Scan on timeline_application_id_disbursement_team_id_index (cost=0.00..34.59 rows=1,262 width=0) (actual time=0.179..0.179 rows=1,282 loops=1)

64. 0.030 0.074 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=18) (actual time=0.073..0.074 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
65. 0.044 0.044 ↑ 1.0 6 1

Seq Scan on disbursement_team _dbmt (cost=0.00..1.06 rows=6 width=18) (actual time=0.037..0.044 rows=6 loops=1)

66. 0.607 5.275 ↑ 3.7 134 1

Unique (cost=193.39..197.42 rows=495 width=20) (actual time=4.079..5.275 rows=134 loops=1)

67. 1.427 4.668 ↓ 1.0 823 1

Sort (cost=193.39..195.41 rows=807 width=20) (actual time=4.076..4.668 rows=823 loops=1)

  • Sort Key: _t_4.application_id DESC, _t_4.id DESC
  • Sort Method: quicksort Memory: 89kB
68. 1.025 3.241 ↓ 1.0 823 1

Hash Join (cost=5.75..154.42 rows=807 width=20) (actual time=0.337..3.241 rows=823 loops=1)

  • Hash Cond: (_t_4.disbursement_team_delegator_id = _d.id)
69. 2.027 2.027 ↓ 1.0 823 1

Seq Scan on timeline _t_4 (cost=0.00..146.55 rows=807 width=12) (actual time=0.111..2.027 rows=823 loops=1)

  • Filter: (disbursement_team_delegator_id IS NOT NULL)
  • Rows Removed by Filter: 5,880
70. 0.088 0.189 ↑ 1.0 122 1

Hash (cost=4.22..4.22 rows=122 width=16) (actual time=0.189..0.189 rows=122 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
71. 0.101 0.101 ↑ 1.0 122 1

Seq Scan on "user" _d (cost=0.00..4.22 rows=122 width=16) (actual time=0.021..0.101 rows=122 loops=1)

Planning time : 18.642 ms
Execution time : 127.714 ms