explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2OHi

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 10,486.195 ↓ 5.0 5 1

Subquery Scan on vo (cost=149,188,573.50..149,192,837.76 rows=1 width=641) (actual time=10,485.009..10,486.195 rows=5 loops=1)

2. 5.268 10,486.191 ↓ 5.0 5 1

Limit (cost=149,188,573.50..149,192,837.50 rows=1 width=609) (actual time=10,485.006..10,486.191 rows=5 loops=1)

3. 503.404 10,480.923 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=3.08..149,188,573.50 rows=34,988 width=609) (actual time=0.510..10,480.923 rows=35,005 loops=1)

  • Join Filter: (pmt.kr_payoff_id = kp.kr_payoff_id)
  • Rows Removed by Join Filter: 525061
4. 27.091 8,822.368 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.73..920,757.31 rows=34,988 width=602) (actual time=0.260..8,822.368 rows=35,005 loops=1)

  • Join Filter: (pay_attr.kr_pay_attr_code = ks.kr_pay_attr_code)
  • Rows Removed by Join Filter: 70071
5. 277.007 8,760.272 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.73..919,181.81 rows=34,988 width=484) (actual time=0.249..8,760.272 rows=35,005 loops=1)

  • Join Filter: (uprep.user_id = ks.prepare_user_id)
  • Rows Removed by Join Filter: 1820124
6. 286.011 8,343.245 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.73..891,889.52 rows=34,988 width=453) (actual time=0.210..8,343.245 rows=35,005 loops=1)

  • Join Filter: (uestb.user_id = ks.establish_user_id)
  • Rows Removed by Join Filter: 1820121
7. 98.588 7,917.214 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.73..864,597.23 rows=34,988 width=422) (actual time=0.166..7,917.214 rows=35,005 loops=1)

  • Join Filter: (kpack.kr_package_id = ks.kr_package_id)
  • Rows Removed by Join Filter: 700027
8. 125.834 7,748.616 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.73..854,099.58 rows=34,988 width=422) (actual time=0.151..7,748.616 rows=35,005 loops=1)

  • Join Filter: ((kdpt.kr_dept_code)::text = (ks.ks_dept_code)::text)
  • Rows Removed by Join Filter: 560075
9. 52.955 7,552.772 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.73..845,176.43 rows=34,988 width=389) (actual time=0.133..7,552.772 rows=35,005 loops=1)

10. 47.696 7,394.802 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.30..649,400.58 rows=34,988 width=385) (actual time=0.130..7,394.802 rows=35,005 loops=1)

11. 33.567 7,172.081 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=0.86..453,624.73 rows=34,988 width=381) (actual time=0.120..7,172.081 rows=35,005 loops=1)

  • Join Filter: (kpa.kr_pay_agent_code = kr.kr_pay_agent_code)
  • Rows Removed by Join Filter: 140020
12. 292.905 7,103.509 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=0.86..450,999.57 rows=34,988 width=305) (actual time=0.110..7,103.509 rows=35,005 loops=1)

  • Join Filter: (kb.kr_bank_code = kr.kr_bank_code)
  • Rows Removed by Join Filter: 1750244
13. 4,145.692 6,670.584 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=0.86..424,231.11 rows=34,988 width=229) (actual time=0.072..6,670.584 rows=35,005 loops=1)

  • Join Filter: (kr.kr_registr_id = kp.kr_registr_id)
  • Rows Removed by Join Filter: 26673806
14. 52.901 424.592 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=0.86..29,025.24 rows=34,988 width=188) (actual time=0.035..424.592 rows=35,005 loops=1)

15. 59.365 266.676 ↓ 1.0 35,005 1

Nested Loop (cost=0.58..14,937.33 rows=34,988 width=99) (actual time=0.027..266.676 rows=35,005 loops=1)

16. 32.286 32.286 ↓ 1.0 35,005 1

Index Scan using kr_payoff_pkey on kr_payoff kp (cost=0.29..1,212.11 rows=34,988 width=42) (actual time=0.017..32.286 rows=35,005 loops=1)

17. 175.025 175.025 ↑ 1.0 1 35,005

Index Scan using kr_statement_pkey on kr_statement ks (cost=0.29..0.38 rows=1 width=61) (actual time=0.004..0.005 rows=1 loops=35,005)

  • Index Cond: (kr_statement_id = kp.kr_statement_id)
18. 105.015 105.015 ↑ 1.0 1 35,005

Index Scan using kr_depositor_pkey on kr_depositor kd (cost=0.29..0.39 rows=1 width=93) (actual time=0.003..0.003 rows=1 loops=35,005)

  • Index Cond: (kr_depositor_id = ks.kr_depositor_id)
19. 2,100.086 2,100.300 ↓ 1.0 763 35,005

Materialize (cost=0.00..18.30 rows=753 width=45) (actual time=0.000..0.060 rows=763 loops=35,005)

20. 0.214 0.214 ↓ 1.0 763 1

Seq Scan on kr_registr kr (cost=0.00..14.53 rows=753 width=45) (actual time=0.015..0.214 rows=763 loops=1)

21. 140.000 140.020 ↑ 1.0 51 35,005

Materialize (cost=0.00..2.76 rows=51 width=84) (actual time=0.000..0.004 rows=51 loops=35,005)

22. 0.020 0.020 ↑ 1.0 51 1

Seq Scan on kr_bank kb (cost=0.00..2.51 rows=51 width=84) (actual time=0.008..0.020 rows=51 loops=1)

23. 34.998 35.005 ↑ 1.0 5 35,005

Materialize (cost=0.00..1.07 rows=5 width=80) (actual time=0.000..0.001 rows=5 loops=35,005)

24. 0.007 0.007 ↑ 1.0 5 1

Seq Scan on kr_pay_agent kpa (cost=0.00..1.05 rows=5 width=80) (actual time=0.006..0.007 rows=5 loops=1)

25. 175.025 175.025 ↑ 1.0 1 35,005

Index Scan using identity_card_pkey on identity_card rus_ic (cost=0.43..5.59 rows=1 width=20) (actual time=0.005..0.005 rows=1 loops=35,005)

  • Index Cond: (identity_card_id = kd.rus_identity_card_id)
26. 105.015 105.015 ↑ 1.0 1 35,005

Index Scan using identity_card_pkey on identity_card ukr_ic (cost=0.43..5.59 rows=1 width=20) (actual time=0.003..0.003 rows=1 loops=35,005)

  • Index Cond: (identity_card_id = kd.ukr_identity_card_id)
27. 70.001 70.010 ↑ 1.0 17 35,005

Materialize (cost=0.00..1.25 rows=17 width=38) (actual time=0.000..0.002 rows=17 loops=35,005)

28. 0.009 0.009 ↑ 1.0 17 1

Seq Scan on kr_dept kdpt (cost=0.00..1.17 rows=17 width=38) (actual time=0.007..0.009 rows=17 loops=1)

29. 70.000 70.010 ↑ 1.0 20 35,005

Materialize (cost=0.00..1.30 rows=20 width=8) (actual time=0.000..0.002 rows=20 loops=35,005)

30. 0.010 0.010 ↑ 1.0 20 1

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

31. 139.999 140.020 ↑ 1.0 52 35,005

Materialize (cost=0.00..1.78 rows=52 width=39) (actual time=0.000..0.004 rows=52 loops=35,005)

32. 0.021 0.021 ↑ 1.0 52 1

Seq Scan on users uestb (cost=0.00..1.52 rows=52 width=39) (actual time=0.008..0.021 rows=52 loops=1)

33. 139.998 140.020 ↑ 1.0 52 35,005

Materialize (cost=0.00..1.78 rows=52 width=39) (actual time=0.000..0.004 rows=52 loops=35,005)

34. 0.022 0.022 ↑ 1.0 52 1

Seq Scan on users uprep (cost=0.00..1.52 rows=52 width=39) (actual time=0.006..0.022 rows=52 loops=1)

35. 34.998 35.005 ↑ 1.0 3 35,005

Materialize (cost=0.00..1.04 rows=3 width=120) (actual time=0.000..0.001 rows=3 loops=35,005)

36. 0.007 0.007 ↑ 1.0 3 1

Seq Scan on kr_pay_attr pay_attr (cost=0.00..1.03 rows=3 width=120) (actual time=0.006..0.007 rows=3 loops=1)

37. 34.934 35.005 ↓ 1.1 15 35,005

Materialize (cost=1.35..1.74 rows=14 width=44) (actual time=0.000..0.001 rows=15 loops=35,005)

38. 0.002 0.071 ↓ 1.1 15 1

Subquery Scan on pmt (cost=1.35..1.67 rows=14 width=44) (actual time=0.052..0.071 rows=15 loops=1)

39. 0.061 0.069 ↓ 1.1 15 1

HashAggregate (cost=1.35..1.53 rows=14 width=44) (actual time=0.052..0.069 rows=15 loops=1)

  • Group Key: kr_payoff_pmt.kr_payoff_id
40. 0.008 0.008 ↑ 1.0 20 1

Seq Scan on kr_payoff_pmt (cost=0.00..1.20 rows=20 width=20) (actual time=0.007..0.008 rows=20 loops=1)

41.          

SubPlan (forNested Loop Left Join)

42. 69.996 69.996 ↑ 1.0 1 34,998

Aggregate (cost=79.43..79.44 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=34,998)

43. 0.000 0.000 ↓ 0.0 0 34,998

Result (cost=0.72..79.43 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=34,998)

  • One-Time Filter: (((kr.kr_pay_num IS NOT NULL) OR (kr.kr_repayment_date IS NOT NULL)) AND (kp.kp_check_result_enum = '-2'::integer))
44. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.72..79.43 rows=1 width=8) (never executed)

45. 0.000 0.000 ↓ 0.0 0

Index Scan using fk_ksa_kr_statement on kr_statement_audit ksa (cost=0.29..20.23 rows=7 width=8) (never executed)

  • Index Cond: (kr_statement_id = kp.kr_statement_id)
46. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_log_pkey on audit_log al (cost=0.42..8.45 rows=1 width=16) (never executed)

  • Index Cond: (audit_log_id = ksa.audit_log_id)
  • Filter: ((al_event_time > kr.kr_create_time) AND (event_sort_id = 40122))
47. 35.005 175.025 ↑ 1.0 1 35,005

Aggregate (cost=2,069.99..2,070.00 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=35,005)

48. 34.977 140.020 ↓ 0.0 0 35,005

Hash Join (cost=3.96..2,064.38 rows=2,245 width=0) (actual time=0.004..0.004 rows=0 loops=35,005)

  • Hash Cond: (kdm.kr_message_type_code = kmt.kr_message_type_code)
49. 105.015 105.015 ↓ 0.0 0 35,005

Index Scan using fk_kdm_kr_depositor on kr_depositor_message kdm (cost=0.42..1,989.57 rows=13,022 width=4) (actual time=0.003..0.003 rows=0 loops=35,005)

  • Index Cond: (kr_depositor_id = ks.kr_depositor_id)
  • Filter: (kdm_date >= trunc(kr.kr_create_time, 'DDD'::text))
  • Rows Removed by Filter: 0
50. 0.007 0.028 ↑ 1.0 5 1

Hash (cost=3.47..3.47 rows=5 width=4) (actual time=0.028..0.028 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
51. 0.021 0.021 ↑ 1.0 5 1

Seq Scan on kr_message_type kmt (cost=0.00..3.47 rows=5 width=4) (actual time=0.012..0.021 rows=5 loops=1)

  • Filter: (event_sort_id = ANY ('{40116,40140,40142,40144,40146}'::integer[]))
  • Rows Removed by Filter: 26
52. 35.005 105.015 ↑ 1.0 1 35,005

Aggregate (cost=2,069.99..2,070.00 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=35,005)

53. 0.000 70.010 ↓ 0.0 0 35,005

Hash Join (cost=3.96..2,064.38 rows=2,245 width=0) (actual time=0.002..0.002 rows=0 loops=35,005)

  • Hash Cond: (kdm_1.kr_message_type_code = kmt_1.kr_message_type_code)
54. 70.010 70.010 ↓ 0.0 0 35,005

Index Scan using fk_kdm_kr_depositor on kr_depositor_message kdm_1 (cost=0.42..1,989.57 rows=13,022 width=4) (actual time=0.002..0.002 rows=0 loops=35,005)

  • Index Cond: (kr_depositor_id = ks.kr_depositor_id)
  • Filter: (kdm_date >= trunc(kr.kr_create_time, 'DDD'::text))
  • Rows Removed by Filter: 0
55. 0.002 0.017 ↑ 1.0 5 1

Hash (cost=3.47..3.47 rows=5 width=4) (actual time=0.017..0.017 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
56. 0.015 0.015 ↑ 1.0 5 1

Seq Scan on kr_message_type kmt_1 (cost=0.00..3.47 rows=5 width=4) (actual time=0.009..0.015 rows=5 loops=1)

  • Filter: (event_sort_id = ANY ('{40117,40141,40143,40145,40147}'::integer[]))
  • Rows Removed by Filter: 26
57. 35.005 175.025 ↑ 1.0 1 35,005

Aggregate (cost=8.31..8.32 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=35,005)

58. 140.020 140.020 ↑ 1.0 1 35,005

Index Scan using fk_kd_kr_statement on kr_debt kd_1 (cost=0.29..8.30 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=35,005)

  • Index Cond: (kr_statement_id = kp.kr_statement_id)
59. 35.005 105.015 ↑ 1.0 1 35,005

Aggregate (cost=8.31..8.32 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=35,005)

60. 70.010 70.010 ↑ 1.0 1 35,005

Index Scan using fk_kd_kr_statement on kr_debt kd_2 (cost=0.29..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=35,005)

  • Index Cond: (kr_statement_id = kp.kr_statement_id)
61. 175.025 490.070 ↑ 1.0 1 35,005

Aggregate (cost=1.30..1.31 rows=1 width=8) (actual time=0.014..0.014 rows=1 loops=35,005)

62. 315.045 315.045 ↓ 0.0 0 35,005

Seq Scan on kr_payoff_pmt kpp (cost=0.00..1.30 rows=1 width=0) (actual time=0.009..0.009 rows=0 loops=35,005)

  • Filter: ((kr_payoff_id < kp.kr_payoff_id) AND (kr_statement_id = kp.kr_statement_id))
  • Rows Removed by Filter: 20