explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GCJg

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=13,800.94..13,800.95 rows=1 width=0) (actual rows= loops=)

  • Sort (cost=13800.93..13800.93 rows=1 width=24) Sort Key: wf_hz.matter_number, cplt.end_date
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,197.45..13,800.92 rows=1 width=24) (actual rows= loops=)

  • ->Nested Loop (cost=1196.47..13791.71 rows=1 width=43) Join Filter: ((ss_kh.data_no)::text = (ks_sk.data_no)::text)
  • ->Index Only Scan using pk_nwa8_t_ks_sk_kth_ss on nwa8_t_ks_sk_kth_ss ks_sk (cost=0.42..0.59 rows=1 width=19) Index Cond: ((ks_cd = (hz.ks_cd)::text) AND (data_no = (hz.data_no)::text))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,196.05..13,791.11 rows=1 width=103) (actual rows= loops=)

  • ->Index Only Scan using pk_nwba_t_kth_kh on nwba_t_kth_kh kh (cost=0.42..0.54 rows=1 width=18) Index Cond: ((ks_cd = (hz.ks_cd)::text) AND (data_kr_no = (hz.data_kr_no)::text))
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,195.63..13,790.55 rows=1 width=115) (actual rows= loops=)

  • ->Nested Loop (cost=292.28..3013.88 rows=1 width=107) Join Filter: (((ss_kh.data_no)::text = (wf_hz.data_no)::text) AND (CASE ss_kh.sap_rk_cd WHEN 'MATTER_DELETE'::text THEN '削除済み'::text ELSE CASE wf_hz.ki_wf_st WHEN '05'::text THEN '再申請待ち'::text WHEN '10'::text THEN '審査中'::text WHEN '90'::text THEN '最終承認済'::text WHEN '91'::text THEN '取止め'::text ELSE NULL::text END END = '審査中'::text))
  • ->Hash Join (cost=291.86..2396.18 rows=1064 width=70) Hash Cond: (((hz.ks_cd)::text = (ss_kh.ks_cd)::text) AND ((hz.data_no)::text = (ss_kh.data_no)::text))
  • ->Index Scan using pk_nwa7_wf_hz_kth_ss on nwa7_wf_hz_kth_ss wf_hz (cost=0.42..0.55 rows=1 width=57) Index Cond: (((ks_cd)::text = (hz.ks_cd)::text) AND ((data_no)::text = (hz.data_no)::text)) Filter: ((ki_wf_st)::text = ANY ('{05,10}'::text[]))
  • ->Hash Right Join (cost=903.35..10776.66 rows=1 width=27) Hash Cond: ((cpl_user.system_matter_id)::text = (umttr.system_matter_id)::text)
5. 0.000 0.000 ↓ 0.0

Seq Scan on nwbb_t_kth_ss_hz hz (cost=0.00..1,600.10 rows=65,810 width=34) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=275.90..275.90 rows=1,064 width=36) (actual rows= loops=)

  • ->Index Scan using idx_nwbc_t_kth_ss_kh_00 on nwbc_t_kth_ss_kh ss_kh (cost=0.29..275.90 rows=1064 width=36) Index Cond: (tkk_jr_yth = '2019-10-10'::date)
7. 0.000 0.000 ↓ 0.0

Append (cost=902.84..10,754.43 rows=1,578 width=97) (actual rows= loops=)

  • ->Hash Left Join (cost=902.84..1289.40 rows=4 width=135) Hash Cond: ((cpl_user.system_matter_id)::text = (ct.system_matter_id)::text)
  • ->Hash Join (cost=460.11..846.11 rows=4 width=108) Hash Cond: (((cpl_user.system_matter_id)::text = (cplt.system_matter_id)::text) AND ((cpl_user.task_id)::text = (cplt.task_id)::text))
  • ->Seq Scan on imw_t_cpl_user cpl_user (cost=0.00..327.10 rows=7848 width=61) Filter: ((locale_id)::text = 'ja'::text)
8. 0.000 0.000 ↓ 0.0

Hash (cost=385.15..385.15 rows=4,997 width=85) (actual rows= loops=)

  • ->Seq Scan on imw_t_cpl_task cplt (cost=0.00..385.15 rows=4997 width=85) Filter: ((status)::text = ANY ('{apply,reapply,discontinue,pullback,sendbacktopullback,approve,sendback}'::text[]))
9. 0.000 0.000 ↓ 0.0

Hash (cost=430.19..430.19 rows=1,003 width=27) (actual rows= loops=)

  • ->HashAggregate (cost=410.14..420.17 rows=1003 width=27) Group Key: ct.system_matter_id
  • ->Seq Scan on imw_t_cpl_task ct (cost=0.00..385.15 rows=4997 width=27) Filter: ((status)::text = ANY ('{apply,reapply,discontinue,pullback,sendbacktopullback,approve,sendback}'::text[]))
10. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=8,951.40..9,465.00 rows=1,574 width=97) (actual rows= loops=)

  • ->Hash Right Join (cost=8951.40..9449.26 rows=1574 width=97) Hash Cond: (((exex_user_numbering.system_matter_id)::text = (task_1.system_matter_id)::text) AND ((exex_user_numbering.node_id)::text = (task_1.node_id)::text))
  • ->Merge Join (cost=8869.05..9342.75 rows=72 width=67) Merge Cond: ((exex_user_numbering.system_matter_id)::text = (exex_user_count.system_matter_id)::text)
  • ->Subquery Scan on exex_user_numbering (cost=4835.97..5301.01 rows=72 width=59) Filter: (exex_user_numbering.row_num = 1)
  • ->Sort (cost=4033.08..4036.96 rows=1551 width=27) Sort Key: exex_user_count.system_matter_id
11. 0.000 0.000 ↓ 0.0

WindowAgg (cost=4,835.97..5,122.15 rows=14,309 width=59) (actual rows= loops=)

  • ->Sort (cost=4835.97..4871.74 rows=14309 width=59) Sort Key: imw_t_actv_executable_user.system_matter_id, imw_t_actv_executable_user.auth_user_code
  • ->Hash Join (cost=916.58..3848.32 rows=14309 width=59) Hash Cond: ((imw_t_actv_executable_user.auth_user_code)::text = (us.user_cd)::text)
  • ->Seq Scan on imw_t_actv_executable_user (cost=0.00..892.11 rows=31609 width=59) Filter: ((locale_id)::text = 'ja'::text)
12. 0.000 0.000 ↓ 0.0

Hash (cost=882.89..882.89 rows=2,695 width=7) (actual rows= loops=)

  • ->Seq Scan on imm_user us (cost=0.00..882.89 rows=2695 width=7) Filter: (((delete_flag)::text = '0'::text) AND (start_date <= now()) AND (end_date > now()))
13. 0.000 0.000 ↓ 0.0

Subquery Scan on exex_user_count (cost=3,919.86..3,950.88 rows=1,551 width=27) (actual rows= loops=)

  • ->HashAggregate (cost=3919.86..3935.37 rows=1551 width=26) Group Key: imw_t_actv_executable_user_1.system_matter_id
  • ->Hash Join (cost=916.58..3848.32 rows=14309 width=26) Hash Cond: ((imw_t_actv_executable_user_1.auth_user_code)::text = (us_1.user_cd)::text)
  • ->Seq Scan on imw_t_actv_executable_user imw_t_actv_executable_user_1 (cost=0.00..892.11 rows=31609 width=26) Filter: ((locale_id)::text = 'ja'::text)
14. 0.000 0.000 ↓ 0.0

Hash (cost=882.89..882.89 rows=2,695 width=7) (actual rows= loops=)

  • ->Seq Scan on imm_user us_1 (cost=0.00..882.89 rows=2695 width=7) Filter: (((delete_flag)::text = '0'::text) AND (start_date <= now()) AND (end_date > now()))
15. 0.000 0.000 ↓ 0.0

Hash (cost=58.74..58.74 rows=1,574 width=65) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on imw_t_actv_task task_1 (cost=0.00..58.74 rows=1,574 width=65) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=0.50..0.50 rows=1 width=19) (actual rows= loops=)

  • ->Index Only Scan using imw_t_actv_matter_pkey on imw_t_actv_matter umttr (cost=0.28..0.50 rows=1 width=19) Index Cond: (system_matter_id = (wf_hz.system_matter_id)::text)
18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.98..9.20 rows=1 width=19) (actual rows= loops=)

  • ->Index Scan using imm_dept_idx_ref_del on imm_department imd (cost=0.28..0.34 rows=1 width=16) Index Cond: (((company_cd)::text = (pos.ks_cd)::text) AND ((department_set_cd)::text = (pos.ks_cd)::text) AND ((department_cd)::text = (pos.approve_auth_dept_code)::text) AND (start_date <= now()) AND (end_date > now()) AND ((delete_flag)::text = '0'::text)) Filter: (((company_cd)::text = (department_set_cd)::text) AND ((locale_id)::text = 'ja'::text))
19. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..8.85 rows=1 width=33) (actual rows= loops=)

  • ->Index Scan using idx_nwur_t_akb_sn_tts_pos_00 on nwur_t_akb_sn_tts_pos pos (cost=0.42..7.00 rows=6 width=54) Index Cond: ((wf_hz.system_matter_id)::text = (system_matter_id)::text)
  • ->Index Only Scan using idx_imw_t_actv_task_00 on imw_t_actv_task task (cost=0.28..0.30 rows=1 width=37) Index Cond: ((system_matter_id = (pos.system_matter_id)::text) AND (node_name = (pos.node_name)::text))