explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xOXd

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 10,371.686 ↓ 5.0 5 1

Hash Right Join (cost=149,185,489.48..149,185,490.11 rows=1 width=641) (actual time=10,371.680..10,371.686 rows=5 loops=1)

  • Hash Cond: (kr_payoff_pmt.kr_payoff_id = kp.kr_payoff_id)
2. 0.056 0.060 ↓ 1.1 15 1

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

  • Group Key: kr_payoff_pmt.kr_payoff_id
3. 0.004 0.004 ↑ 1.0 20 1

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

4. 0.017 10,371.608 ↓ 5.0 5 1

Hash (cost=149,185,488.12..149,185,488.12 rows=1 width=569) (actual time=10,371.608..10,371.608 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
5. 5.557 10,371.591 ↓ 5.0 5 1

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

6. 444.816 10,366.034 ↓ 1.0 35,005 1

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

  • Join Filter: (pay_attr.kr_pay_attr_code = ks.kr_pay_attr_code)
  • Rows Removed by Join Filter: 70071
7. 282.033 8,801.065 ↓ 1.0 35,005 1

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

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

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

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

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

  • Join Filter: (kpack.kr_package_id = ks.kr_package_id)
  • Rows Removed by Join Filter: 700027
10. 124.320 7,790.181 ↓ 1.0 35,005 1

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

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

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

12. 46.795 7,406.864 ↓ 1.0 35,005 1

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

13. 32.097 7,150.039 ↓ 1.0 35,005 1

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

  • Join Filter: (kpa.kr_pay_agent_code = kr.kr_pay_agent_code)
  • Rows Removed by Join Filter: 140020
14. 293.884 7,082.937 ↓ 1.0 35,005 1

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

  • Join Filter: (kb.kr_bank_code = kr.kr_bank_code)
  • Rows Removed by Join Filter: 1750244
15. 4,130.349 6,649.033 ↓ 1.0 35,005 1

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

  • Join Filter: (kr.kr_registr_id = kp.kr_registr_id)
  • Rows Removed by Join Filter: 26673806
16. 48.204 418.384 ↓ 1.0 35,005 1

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

17. 54.765 265.165 ↓ 1.0 35,005 1

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

18. 35.375 35.375 ↓ 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.043..35.375 rows=35,005 loops=1)

19. 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)
20. 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)
21. 2,100.020 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)

22. 0.280 0.280 ↓ 1.0 763 1

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

23. 139.971 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)

24. 0.049 0.049 ↑ 1.0 51 1

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

25. 34.971 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)

26. 0.034 0.034 ↑ 1.0 5 1

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

27. 210.030 210.030 ↑ 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.006..0.006 rows=1 loops=35,005)

  • Index Cond: (identity_card_id = kd.rus_identity_card_id)
28. 140.020 140.020 ↑ 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.004..0.004 rows=1 loops=35,005)

  • Index Cond: (identity_card_id = kd.ukr_identity_card_id)
29. 69.995 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)

30. 0.015 0.015 ↑ 1.0 17 1

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

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

32. 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.007..0.012 rows=20 loops=1)

33. 139.990 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.030 0.030 ↑ 1.0 52 1

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

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

36. 0.019 0.019 ↑ 1.0 52 1

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

37. 34.991 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)

38. 0.014 0.014 ↑ 1.0 3 1

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

39.          

SubPlan (forNested Loop Left Join)

40. 34.998 34.998 ↑ 1.0 1 34,998

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

41. 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))
42. 0.000 0.000 ↓ 0.0 0

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

43. 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)
44. 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))
45. 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)

46. 34.982 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)
47. 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
48. 0.004 0.023 ↑ 1.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
49. 0.019 0.019 ↑ 1.0 5 1

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

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

51. 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)
52. 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
53. 0.001 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
54. 0.016 0.016 ↑ 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.016 rows=5 loops=1)

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

56. 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)
57. 70.010 140.020 ↑ 1.0 1 35,005

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

58. 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)
59. 140.020 455.065 ↑ 1.0 1 35,005

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

60. 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 : 19.860 ms
Execution time : 10,372.243 ms