explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Axrl

Settings
# exclusive inclusive rows x rows loops node
1. 478,837.911 478,837.911 ↓ 14.9 238 1

CTE Scan on dbt_incr_sbq (cost=18,079,711.75..18,079,712.07 rows=16 width=3,818) (actual time=438,934.463..478,837.911 rows=238 loops=1)

  • Buffers: shared hit=29442599 read=926656 dirtied=6462 written=1523
2.          

CTE dbt_incr_sbq

3. 17.285 478,836.446 ↓ 14.9 238 1

Nested Loop Left Join (cost=15,429,169.61..18,079,711.75 rows=16 width=498) (actual time=438,934.455..478,836.446 rows=238 loops=1)

  • Buffers: shared hit=29442599 read=926656 dirtied=6462 written=1523
4. 95.462 475,706.121 ↓ 14.9 238 1

Merge Join (cost=15,429,114.76..18,077,767.25 rows=16 width=448) (actual time=438,903.241..475,706.121 rows=238 loops=1)

  • Merge Cond: (l.id = l_1.id)
  • Buffers: shared hit=29337850 read=917103 dirtied=6239 written=1523
5. 725.065 437,635.248 ↓ 9,859.7 157,755 1

Sort (cost=8,920.73..8,920.77 rows=16 width=448) (actual time=437,547.012..437,635.248 rows=157,755 loops=1)

  • Sort Key: l.id
  • Sort Method: quicksort Memory: 87209kB
  • Buffers: shared hit=8346497 read=787949 dirtied=804 written=1523
6. 483.054 436,910.183 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=213.21..8,920.41 rows=16 width=448) (actual time=45.240..436,910.183 rows=157,755 loops=1)

  • Buffers: shared hit=8346497 read=787949 dirtied=804 written=1523
7. 723.764 434,849.579 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=210.48..8,876.25 rows=16 width=384) (actual time=44.816..434,849.579 rows=157,755 loops=1)

  • Join Filter: (asm.id = cpa.account_status_master_id)
  • Rows Removed by Join Filter: 815201
  • Buffers: shared hit=7982409 read=785696 dirtied=770 written=1520
8. 269.343 433,652.550 ↓ 9,859.7 157,755 1

Hash Left Join (cost=210.48..8,830.90 rows=16 width=388) (actual time=44.294..433,652.550 rows=157,755 loops=1)

  • Hash Cond: (cpa.product_family_id = pf.id)
  • Buffers: shared hit=7982409 read=785695 dirtied=770 written=1520
9. 392.361 433,383.114 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=208.54..8,828.76 rows=16 width=388) (actual time=44.174..433,383.114 rows=157,755 loops=1)

  • Buffers: shared hit=7982408 read=785695 dirtied=770 written=1520
10. 410.699 432,517.488 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=208.26..8,801.21 rows=16 width=361) (actual time=44.143..432,517.488 rows=157,755 loops=1)

  • Buffers: shared hit=7509212 read=785674 dirtied=770 written=1520
11. 456.009 422,956.999 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=194.72..8,564.75 rows=16 width=357) (actual time=24.228..422,956.999 rows=157,755 loops=1)

  • Buffers: shared hit=5985268 read=785577 dirtied=770 written=1520
12. 413.891 421,712.215 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=194.15..8,520.14 rows=16 width=277) (actual time=24.202..421,712.215 rows=157,755 loops=1)

  • Buffers: shared hit=5196032 read=785577 dirtied=770 written=1520
13. 261.174 52,782.644 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=180.85..8,306.82 rows=16 width=269) (actual time=18.640..52,782.644 rows=157,755 loops=1)

  • Buffers: shared hit=3076774 read=104534 dirtied=688 written=131
14. 434.360 52,363.715 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=180.70..8,283.01 rows=16 width=241) (actual time=18.626..52,363.715 rows=157,755 loops=1)

  • Buffers: shared hit=3047226 read=104532 dirtied=688 written=131
15. 374.066 51,140.580 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=180.28..8,251.26 rows=16 width=241) (actual time=18.576..51,140.580 rows=157,755 loops=1)

  • Buffers: shared hit=2416275 read=104146 dirtied=688 written=131
16. 413.037 49,504.474 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=179.86..8,215.29 rows=16 width=229) (actual time=18.150..49,504.474 rows=157,755 loops=1)

  • Buffers: shared hit=1786371 read=102921 dirtied=688 written=121
17. 284.562 48,775.927 ↓ 9,859.7 157,755 1

Nested Loop (cost=179.72..8,203.10 rows=16 width=205) (actual time=18.131..48,775.927 rows=157,755 loops=1)

  • Buffers: shared hit=1470863 read=102921 dirtied=688 written=121
18. 318.117 7,317.310 ↓ 9,859.7 157,755 1

Nested Loop Left Join (cost=179.28..8,157.85 rows=16 width=186) (actual time=18.064..7,317.310 rows=157,755 loops=1)

  • Buffers: shared hit=927985 read=14665 dirtied=201 written=76
19. 431.453 5,737.153 ↓ 9,859.7 157,755 1

Nested Loop (cost=178.86..8,126.15 rows=16 width=143) (actual time=18.050..5,737.153 rows=157,755 loops=1)

  • Buffers: shared hit=775246 read=11869 dirtied=199 written=70
20. 217.370 1,677.335 ↓ 60.1 157,755 1

Hash Left Join (cost=178.44..2,240.99 rows=2,623 width=112) (actual time=16.332..1,677.335 rows=157,755 loops=1)

  • Hash Cond: (l.allocated_to = iu.id)
  • Buffers: shared hit=150292 read=5763
21. 212.247 1,450.932 ↓ 60.1 157,755 1

Hash Left Join (cost=63.68..2,093.12 rows=2,623 width=108) (actual time=7.257..1,450.932 rows=157,755 loops=1)

  • Hash Cond: (l.product_status_id = ps.id)
  • Buffers: shared hit=150230 read=5763
22. 305.242 1,235.465 ↓ 60.1 157,755 1

Hash Left Join (cost=12.73..2,009.06 rows=2,623 width=103) (actual time=4.018..1,235.465 rows=157,755 loops=1)

  • Hash Cond: (l.crm_status_id = cs.id)
  • Buffers: shared hit=150202 read=5763
23. 929.560 929.560 ↓ 60.1 157,755 1

Index Scan using idx_coll_leads on leads l (cost=0.42..1,963.70 rows=2,623 width=100) (actual time=3.334..929.560 rows=157,755 loops=1)

  • Buffers: shared hit=150197 read=5763
24. 0.312 0.663 ↓ 1.2 381 1

Hash (cost=8.25..8.25 rows=325 width=23) (actual time=0.663..0.663 rows=381 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 30kB
  • Buffers: shared hit=5
25. 0.351 0.351 ↓ 1.2 381 1

Seq Scan on crm_status cs (cost=0.00..8.25 rows=325 width=23) (actual time=0.012..0.351 rows=381 loops=1)

  • Buffers: shared hit=5
26. 2.040 3.220 ↓ 1.1 1,146 1

Hash (cost=38.20..38.20 rows=1,020 width=13) (actual time=3.220..3.220 rows=1,146 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 69kB
  • Buffers: shared hit=28
27. 1.180 1.180 ↓ 1.1 1,146 1

Seq Scan on product_status ps (cost=0.00..38.20 rows=1,020 width=13) (actual time=0.025..1.180 rows=1,146 loops=1)

  • Buffers: shared hit=28
28. 1.856 9.033 ↑ 1.0 2,345 1

Hash (cost=85.45..85.45 rows=2,345 width=12) (actual time=9.033..9.033 rows=2,345 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 141kB
  • Buffers: shared hit=62
29. 7.177 7.177 ↑ 1.0 2,345 1

Seq Scan on internal_users iu (cost=0.00..85.45 rows=2,345 width=12) (actual time=0.014..7.177 rows=2,345 loops=1)

  • Buffers: shared hit=62
30. 3,628.365 3,628.365 ↑ 1.0 1 157,755

Index Scan using user_lender_accounts_pkey on user_lender_accounts ula (cost=0.42..2.24 rows=1 width=31) (actual time=0.023..0.023 rows=1 loops=157,755)

  • Index Cond: (id = l.user_lender_account_id)
  • Buffers: shared hit=624954 read=6106 dirtied=199 written=70
31. 1,262.040 1,262.040 ↓ 0.0 0 157,755

Index Scan using user_lender_payment_plans_pkey on user_lender_payment_plans ulpp (cost=0.42..1.98 rows=1 width=51) (actual time=0.008..0.008 rows=0 loops=157,755)

  • Index Cond: (id = ula.user_lender_payment_plan_id)
  • Buffers: shared hit=152739 read=2796 dirtied=2 written=6
32. 41,174.055 41,174.055 ↑ 1.0 1 157,755

Index Scan using users_pkey on users u (cost=0.43..2.83 rows=1 width=27) (actual time=0.261..0.261 rows=1 loops=157,755)

  • Index Cond: (user_id = l.user_id)
  • Buffers: shared hit=542878 read=88256 dirtied=487 written=45
33. 315.510 315.510 ↑ 1.0 1 157,755

Index Scan using tblfacilitystatus_pkey on tblfacilitystatus tfs (cost=0.14..0.76 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=157,755)

  • Index Cond: (id = l.tblfacilitystatus_id)
  • Buffers: shared hit=315508
34. 1,262.040 1,262.040 ↑ 1.0 1 157,755

Index Scan using user_service_orders_pkey on user_service_orders uso (cost=0.42..2.25 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=157,755)

  • Index Cond: (id = l.user_service_order_id)
  • Buffers: shared hit=629904 read=1225 written=10
35. 788.775 788.775 ↑ 1.0 1 157,755

Index Scan using orders_pkey on orders o (cost=0.42..1.98 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=157,755)

  • Index Cond: (id = uso.order_payment_id)
  • Buffers: shared hit=630951 read=386
36. 157.755 157.755 ↓ 0.0 0 157,755

Index Scan using lead_priorities_pkey on lead_priorities lp (cost=0.15..1.49 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=157,755)

  • Index Cond: (id = l.lead_priority_id)
  • Buffers: shared hit=29548 read=2
37. 1,104.285 368,515.680 ↑ 1.0 1 157,755

Aggregate (cost=13.30..13.31 rows=1 width=8) (actual time=2.335..2.336 rows=1 loops=157,755)

  • Buffers: shared hit=2119258 read=681043 dirtied=82 written=1389
38.          

Initplan (forAggregate)

39. 44,329.155 44,329.155 ↑ 1.0 1 157,755

Index Scan using customer_profile_accounts_pkey on customer_profile_accounts customer_profile_accounts_1 (cost=0.57..2.99 rows=1 width=28) (actual time=0.280..0.281 rows=1 loops=157,755)

  • Index Cond: (customer_profile_account_id = $14)
  • Buffers: shared hit=715637 read=74024 dirtied=74 written=267
40. 323,082.240 323,082.240 ↑ 1.0 2 157,755

Index Scan using idx_account_no_cpa on customer_profile_accounts (cost=0.57..10.31 rows=2 width=8) (actual time=1.512..2.048 rows=2 loops=157,755)

  • Index Cond: ((account_no)::text = ($15)::text)
  • Filter: (created_on <= o.payment_date)
  • Rows Removed by Filter: 6
  • Buffers: shared hit=1403621 read=607019 dirtied=8 written=1122
41. 788.775 788.775 ↑ 1.0 1 157,755

Index Scan using customer_profile_accounts_pkey on customer_profile_accounts cpa (cost=0.57..2.79 rows=1 width=88) (actual time=0.005..0.005 rows=1 loops=157,755)

  • Index Cond: (customer_profile_account_id = ula.report_account_id)
  • Buffers: shared hit=789236
42. 473.265 9,149.790 ↑ 1.0 1 157,755

Limit (cost=13.54..14.76 rows=1 width=4) (actual time=0.058..0.058 rows=1 loops=157,755)

  • Buffers: shared hit=1523944 read=97
43. 473.265 8,676.525 ↑ 1.0 1 157,755

Bitmap Heap Scan on lender_account_status las (cost=13.54..14.76 rows=1 width=4) (actual time=0.055..0.055 rows=1 loops=157,755)

  • Recheck Cond: ((product_family_id = cpa.product_family_id) AND (account_status_id = cpa.account_status_master_id) AND (lender_id = cpa.lender_id))
  • Heap Blocks: exact=108428
  • Buffers: shared hit=1523944 read=97
44. 1,293.408 8,203.260 ↓ 0.0 0 157,755

BitmapAnd (cost=13.54..13.54 rows=1 width=0) (actual time=0.052..0.052 rows=0 loops=157,755)

  • Buffers: shared hit=1415554 read=59
45. 3,155.100 3,155.100 ↓ 1.4 378 157,755

Bitmap Index Scan on idx_las_product_family_id (cost=0.00..3.45 rows=262 width=0) (actual time=0.020..0.020 rows=378 loops=157,755)

  • Index Cond: (product_family_id = cpa.product_family_id)
  • Buffers: shared hit=485667 read=19
46. 1,883.964 1,883.964 ↓ 1.0 242 156,997

Bitmap Index Scan on idx_las_account_status_id (cost=0.00..4.47 rows=239 width=0) (actual time=0.012..0.012 rows=242 loops=156,997)

  • Index Cond: (account_status_id = cpa.account_status_master_id)
  • Buffers: shared hit=468865 read=21
47. 1,870.788 1,870.788 ↑ 1.2 261 155,899

Bitmap Index Scan on idx_las_lender_id (cost=0.00..5.11 rows=324 width=0) (actual time=0.012..0.012 rows=261 loops=155,899)

  • Index Cond: (lender_id = cpa.lender_id)
  • Buffers: shared hit=461022 read=19
48. 473.265 473.265 ↑ 1.0 1 157,755

Index Scan using lenders_pkey on lenders len (cost=0.28..1.72 rows=1 width=31) (actual time=0.003..0.003 rows=1 loops=157,755)

  • Index Cond: (id = cpa.lender_id)
  • Buffers: shared hit=473196 read=21
49. 0.045 0.093 ↓ 1.2 49 1

Hash (cost=1.42..1.42 rows=42 width=8) (actual time=0.093..0.093 rows=49 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
50. 0.048 0.048 ↓ 1.2 49 1

Seq Scan on product_families pf (cost=0.00..1.42 rows=42 width=8) (actual time=0.012..0.048 rows=49 loops=1)

  • Buffers: shared hit=1
51. 472.761 473.265 ↑ 23.3 6 157,755

Materialize (cost=0.00..12.10 rows=140 width=4) (actual time=0.001..0.003 rows=6 loops=157,755)

  • Buffers: shared read=1
52. 0.504 0.504 ↑ 23.3 6 1

Seq Scan on account_status_master asm (cost=0.00..11.40 rows=140 width=4) (actual time=0.500..0.504 rows=6 loops=1)

  • Buffers: shared read=1
53. 473.265 1,577.550 ↑ 1.0 1 157,755

Aggregate (cost=2.73..2.74 rows=1 width=72) (actual time=0.010..0.010 rows=1 loops=157,755)

  • Buffers: shared hit=364088 read=2253 dirtied=34 written=3
54. 1,104.285 1,104.285 ↓ 0.0 0 157,755

Index Scan using idx_lai_ulap on user_lender_account_payments (cost=0.29..2.71 rows=1 width=22) (actual time=0.007..0.007 rows=0 loops=157,755)

  • Index Cond: (lender_account_id = ula.id)
  • Filter: (is_active = 1)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=364088 read=2253 dirtied=34 written=3
55. 78.911 37,975.411 ↑ 567.8 46,169 1

Unique (cost=15,420,194.02..17,741,142.55 rows=26,216,298 width=8) (actual time=380.197..37,975.411 rows=46,169 loops=1)

  • Buffers: shared hit=20991353 read=129154 dirtied=5435
56.          

Initplan (forUnique)

57. 0.003 2.113 ↑ 1.0 1 1

Result (cost=0.45..0.46 rows=1 width=8) (actual time=2.113..2.113 rows=1 loops=1)

  • Buffers: shared read=5 dirtied=1
58.          

Initplan (forResult)

59. 0.002 2.110 ↑ 1.0 1 1

Limit (cost=0.42..0.45 rows=1 width=8) (actual time=2.109..2.110 rows=1 loops=1)

  • Buffers: shared read=5 dirtied=1
60. 2.108 2.108 ↑ 182,549.0 1 1

Index Only Scan Backward using collections_leads__index_on_modified_ts on collections_leads (cost=0.42..5,645.03 rows=182,549 width=8) (actual time=2.108..2.108 rows=1 loops=1)

  • Index Cond: (modified_ts IS NOT NULL)
  • Heap Fetches: 1
  • Buffers: shared read=5 dirtied=1
61. 10,830.826 37,894.387 ↑ 470.4 144,001 1

Merge Join (cost=15,420,193.56..17,571,792.25 rows=67,739,936 width=8) (actual time=380.195..37,894.387 rows=144,001 loops=1)

  • Merge Cond: (l_1.id = ll.lead_id)
  • Buffers: shared hit=20991353 read=129154 dirtied=5435
62. 26,561.015 26,561.015 ↓ 1.0 26,233,500 1

Index Only Scan using leads_pkey on leads l_1 (cost=0.56..900,981.36 rows=26,216,298 width=8) (actual time=0.047..26,561.015 rows=26,233,500 loops=1)

  • Heap Fetches: 17321352
  • Buffers: shared hit=20989831 read=128446 dirtied=5434
63. 115.659 502.546 ↑ 470.4 144,001 1

Materialize (cost=15,420,188.76..15,758,888.44 rows=67,739,936 width=4) (actual time=317.701..502.546 rows=144,001 loops=1)

  • Buffers: shared hit=1522 read=708 dirtied=1
64. 154.276 386.887 ↑ 470.4 144,001 1

Sort (cost=15,420,188.76..15,589,538.60 rows=67,739,936 width=4) (actual time=317.697..386.887 rows=144,001 loops=1)

  • Sort Key: ll.lead_id
  • Sort Method: quicksort Memory: 12908kB
  • Buffers: shared hit=1522 read=708 dirtied=1
65. 129.266 232.611 ↑ 469.5 144,294 1

Hash Join (cost=964,218.11..6,053,742.52 rows=67,739,936 width=4) (actual time=25.844..232.611 rows=144,294 loops=1)

  • Hash Cond: (ll.lead_log_type_id = llt.id)
  • Buffers: shared hit=1518 read=708 dirtied=1
66. 77.706 103.312 ↑ 563.3 144,294 1

Bitmap Heap Scan on lead_logs ll (cost=964,216.78..5,067,560.62 rows=81,287,923 width=28) (actual time=25.799..103.312 rows=144,294 loops=1)

  • Recheck Cond: (updated_at >= ($24 - '03:00:00'::interval))
  • Heap Blocks: exact=1673
  • Buffers: shared hit=1517 read=708 dirtied=1
67. 25.606 25.606 ↑ 563.3 144,294 1

Bitmap Index Scan on idx_updated_at_ll (cost=0.00..943,894.79 rows=81,287,923 width=0) (actual time=25.606..25.606 rows=144,294 loops=1)

  • Index Cond: (updated_at >= ($24 - '03:00:00'::interval))
  • Buffers: shared hit=178 read=374 dirtied=1
68. 0.014 0.033 ↓ 1.5 22 1

Hash (cost=1.15..1.15 rows=15 width=4) (actual time=0.033..0.033 rows=22 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
69. 0.019 0.019 ↓ 1.5 22 1

Seq Scan on lead_log_types llt (cost=0.00..1.15 rows=15 width=4) (actual time=0.010..0.019 rows=22 loops=1)

  • Buffers: shared hit=1
70. 24.038 2,389.044 ↑ 1.0 1 238

Aggregate (cost=54.86..54.87 rows=1 width=16) (actual time=10.038..10.038 rows=1 loops=238)

  • Buffers: shared hit=61913 read=7693
71. 26.758 2,365.006 ↓ 3.9 71 238

Nested Loop Left Join (cost=2.74..54.77 rows=18 width=17) (actual time=0.132..9.937 rows=71 loops=238)

  • Buffers: shared hit=61913 read=7693
72. 14.994 2,304.554 ↓ 3.9 71 238

Nested Loop (cost=2.47..22.99 rows=18 width=12) (actual time=0.123..9.683 rows=71 loops=238)

  • Buffers: shared hit=11372 read=7693
73. 3.808 3.808 ↑ 1.0 1 238

Index Only Scan using leads_pkey on leads l_2 (cost=0.56..2.98 rows=1 width=8) (actual time=0.014..0.016 rows=1 loops=238)

  • Index Cond: (id = l.id)
  • Heap Fetches: 237
  • Buffers: shared hit=1369 read=13
74. 21.859 2,285.752 ↓ 3.9 71 238

Hash Join (cost=1.91..19.83 rows=18 width=16) (actual time=0.105..9.604 rows=71 loops=238)

  • Hash Cond: (ll_1.lead_log_type_id = llt_1.id)
  • Buffers: shared hit=10003 read=7680
75. 2,263.856 2,263.856 ↓ 3.2 71 238

Index Scan using idx_lead_id_lead_logs on lead_logs ll_1 (cost=0.57..18.22 rows=22 width=36) (actual time=0.102..9.512 rows=71 loops=238)

  • Index Cond: (lead_id = l.id)
  • Buffers: shared hit=10002 read=7680
76. 0.015 0.037 ↓ 1.5 22 1

Hash (cost=1.15..1.15 rows=15 width=4) (actual time=0.037..0.037 rows=22 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
77. 0.022 0.022 ↓ 1.5 22 1

Seq Scan on lead_log_types llt_1 (cost=0.00..1.15 rows=15 width=4) (actual time=0.013..0.022 rows=22 loops=1)

  • Buffers: shared hit=1
78. 33.694 33.694 ↑ 1.0 1 16,847

Index Scan using product_status_pkey on product_status ps_1 (cost=0.28..1.77 rows=1 width=13) (actual time=0.002..0.002 rows=1 loops=16,847)

  • Index Cond: (ll_1.product_status_id = id)
  • Buffers: shared hit=50541
79.          

SubPlan (forNested Loop Left Join)

80. 1.190 66.640 ↑ 1.0 1 238

Limit (cost=0.44..6.50 rows=1 width=8) (actual time=0.279..0.280 rows=1 loops=238)

  • Buffers: shared hit=2143 read=280 dirtied=223
81. 65.450 65.450 ↑ 1.0 1 238

Index Scan using idx_user_id_leads on leads (cost=0.44..6.50 rows=1 width=8) (actual time=0.275..0.275 rows=1 loops=238)

  • Index Cond: (user_id = l.user_id)
  • Filter: ((user_lender_account_id IS NULL) AND (user_bureau_dispute_id IS NULL) AND (user_service_order_id = uso.id))
  • Rows Removed by Filter: 5
  • Buffers: shared hit=1920 read=280
82. 2.856 420.784 ↑ 1.0 1 238

Aggregate (cost=8.71..8.72 rows=1 width=8) (actual time=1.768..1.768 rows=1 loops=238)

  • Buffers: shared hit=1595 read=1095
83. 417.928 417.928 ↑ 1.0 7 238

Index Scan using idx_user_id_customer_profiles on customer_profiles (cost=0.56..8.69 rows=7 width=8) (actual time=0.460..1.756 rows=7 loops=238)

  • Index Cond: (user_id = l.user_id)
  • Buffers: shared hit=1595 read=1095
84. 1.904 4.522 ↑ 1.0 1 238

Aggregate (cost=8.71..8.72 rows=1 width=8) (actual time=0.019..0.019 rows=1 loops=238)

  • Buffers: shared hit=2690
85. 2.618 2.618 ↑ 1.0 7 238

Index Scan using idx_user_id_customer_profiles on customer_profiles customer_profiles_1 (cost=0.56..8.69 rows=7 width=8) (actual time=0.005..0.011 rows=7 loops=238)

  • Index Cond: (user_id = l.user_id)
  • Buffers: shared hit=2690
86. 1.428 16.184 ↑ 1.0 1 238

Aggregate (cost=18.30..18.31 rows=1 width=8) (actual time=0.067..0.068 rows=1 loops=238)

  • Buffers: shared hit=17682
87. 14.756 14.756 ↑ 1.6 5 238

Index Scan using idx_lead_id_lead_logs on lead_logs (cost=0.57..18.28 rows=8 width=8) (actual time=0.041..0.062 rows=5 loops=238)

  • Index Cond: (lead_id = l.id)
  • Filter: (lead_log_type_id = ANY ('{5,8}'::integer[]))
  • Rows Removed by Filter: 66
  • Buffers: shared hit=17682
88. 7.616 24.514 ↑ 1.0 1 238

Aggregate (cost=18.42..18.43 rows=1 width=8) (actual time=0.103..0.103 rows=1 loops=238)

  • Buffers: shared hit=17682
89. 16.898 16.898 ↓ 66.0 66 238

Index Scan using idx_lead_id_lead_logs on lead_logs lead_logs_1 (cost=0.57..18.42 rows=1 width=8) (actual time=0.006..0.071 rows=66 loops=238)

  • Index Cond: (lead_id = l.id)
  • Filter: ((source = 'CRM'::lead_logs_source_type) AND (lead_log_type_id = 1) AND (updated_by <> ALL ('{7777,8888,9999}'::integer[])))
  • Rows Removed by Filter: 5
  • Buffers: shared hit=17682
90. 123.760 123.760 ↓ 0.0 0 238

Index Scan using idx_account_no_lb on lender_bases lb (cost=0.42..2.85 rows=1 width=0) (actual time=0.520..0.520 rows=0 loops=238)

  • Index Cond: ((account_no)::text = (cpa.account_no)::text)
  • Filter: ((lender_id = cpa.lender_id) AND ((base_type)::text = 'lenderbase'::text))
  • Buffers: shared hit=448 read=309
91. 0.000 0.000 ↓ 0.0 0

Seq Scan on lender_bases lb_1 (cost=0.00..36,855.79 rows=608,490 width=36) (never executed)

  • Filter: ((base_type)::text = 'lenderbase'::text)
92. 67.592 67.592 ↓ 0.0 0 238

Index Only Scan using idx_user_id_dnd_users on dnd_users (cost=0.42..2.83 rows=1 width=0) (actual time=0.284..0.284 rows=0 loops=238)

  • Index Cond: (user_id = l.user_id)
  • Heap Fetches: 1
  • Buffers: shared hit=541 read=175
93. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_user_id_dnd_users on dnd_users dnd_users_1 (cost=0.42..2,420.95 rows=79,371 width=8) (never executed)

  • Heap Fetches: 0