explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uK2

Settings
# exclusive inclusive rows x rows loops node
1. 5.547 10,325.730 ↓ 5.0 5 1

Limit (cost=149,181,224.32..149,185,488.11 rows=1 width=569) (actual time=10,324.557..10,325.730 rows=5 loops=1)

2. 417.288 10,320.183 ↓ 1.0 35,005 1

Nested Loop Left Join (cost=1.73..149,181,224.32 rows=34,988 width=569) (actual time=0.433..10,320.183 rows=35,005 loops=1)

  • Join Filter: (pay_attr.kr_pay_attr_code = ks.kr_pay_attr_code)
  • Rows Removed by Join Filter: 70071
3. 276.892 8,747.744 ↓ 1.0 35,005 1

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

  • Join Filter: (uprep.user_id = ks.prepare_user_id)
  • Rows Removed by Join Filter: 1820124
4. 285.156 8,330.832 ↓ 1.0 35,005 1

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

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

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

  • Join Filter: (kpack.kr_package_id = ks.kr_package_id)
  • Rows Removed by Join Filter: 700027
6. 125.315 7,739.103 ↓ 1.0 35,005 1

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

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

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

8. 42.816 7,388.860 ↓ 1.0 35,005 1

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

9. 30.990 7,171.019 ↓ 1.0 35,005 1

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

  • Join Filter: (kpa.kr_pay_agent_code = kr.kr_pay_agent_code)
  • Rows Removed by Join Filter: 140020
10. 293.917 7,105.024 ↓ 1.0 35,005 1

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

  • Join Filter: (kb.kr_bank_code = kr.kr_bank_code)
  • Rows Removed by Join Filter: 1750244
11. 4,149.664 6,671.087 ↓ 1.0 35,005 1

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

  • Join Filter: (kr.kr_registr_id = kp.kr_registr_id)
  • Rows Removed by Join Filter: 26673806
12. 50.118 421.123 ↓ 1.0 35,005 1

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

13. 58.533 265.990 ↓ 1.0 35,005 1

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

14. 32.432 32.432 ↓ 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.016..32.432 rows=35,005 loops=1)

15. 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)
16. 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)
17. 2,100.090 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)

18. 0.210 0.210 ↓ 1.0 763 1

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

19. 140.001 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)

20. 0.019 0.019 ↑ 1.0 51 1

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

21. 34.996 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)

22. 0.009 0.009 ↑ 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.009 rows=5 loops=1)

23. 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)
24. 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)
25. 70.000 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)

26. 0.010 0.010 ↑ 1.0 17 1

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

27. 69.998 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)

28. 0.012 0.012 ↑ 1.0 20 1

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

29. 139.995 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)

30. 0.025 0.025 ↑ 1.0 52 1

Seq Scan on users uestb (cost=0.00..1.52 rows=52 width=39) (actual time=0.009..0.025 rows=52 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 uprep (cost=0.00..1.52 rows=52 width=39) (actual time=0.006..0.021 rows=52 loops=1)

33. 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)

34. 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)

35.          

SubPlan (forNested Loop Left Join)

36. 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)

37. 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))
38. 0.000 0.000 ↓ 0.0 0

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

39. 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)
40. 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))
41. 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)

42. 34.983 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)
43. 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
44. 0.005 0.022 ↑ 1.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
45. 0.017 0.017 ↑ 1.0 5 1

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

  • Filter: (event_sort_id = ANY ('{40116,40140,40142,40144,40146}'::integer[]))
  • Rows Removed by Filter: 26
46. 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)

47. 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)
48. 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
49. 0.002 0.016 ↑ 1.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
50. 0.014 0.014 ↑ 1.0 5 1

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

  • Filter: (event_sort_id = ANY ('{40117,40141,40143,40145,40147}'::integer[]))
  • Rows Removed by Filter: 26
51. 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)

52. 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)
53. 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)

54. 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)
55. 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)

56. 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
Planning time : 17.901 ms
Execution time : 10,326.159 ms