explain.depesz.com

A tool for finding a real cause for slow queries.

Result: JJj : NEW_P32_V_REPORT

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 489.312 4379.218 ↓ 1.5 9 1

HashAggregate (cost=176.50..177.76 rows=6 width=357) (actual time=4379.089..4379.218 rows=9 loops=1)

2. 109.389 3889.906 ↓ 15003.0 90018 1

Merge Semi Join (cost=13.77..175.66 rows=6 width=357) (actual time=1433.801..3889.906 rows=90018 loops=1)

  • Merge Cond: ((fenvy.process_year)::text = (ft_employers.er_cur_taxyear)::text)
3. 126.638 3780.482 ↓ 253.5 91020 1

Nested Loop (cost=5.49..2645.37 rows=359 width=391) (actual time=444.793..3780.482 rows=91020 loops=1)

  • Join Filter: (fst.taxyear_id = spb.spp_bir_taxyear_id)
4. 123.855 3562.824 ↓ 253.5 91020 1

Nested Loop (cost=5.49..2584.99 rows=359 width=363) (actual time=444.780..3562.824 rows=91020 loops=1)

  • Join Filter: (fst.taxyear_id = sap.sap_taxyear_id)
5. 126.666 3347.949 ↓ 253.5 91020 1

Nested Loop (cost=5.49..2524.62 rows=359 width=303) (actual time=444.766..3347.949 rows=91020 loops=1)

  • Join Filter: (fst.taxyear_id = spa.spp_adp_taxyear_id)
6. 50.677 3130.263 ↓ 253.5 91020 1

Nested Loop (cost=5.49..2464.25 rows=359 width=243) (actual time=444.753..3130.263 rows=91020 loops=1)

7. 88.178 3079.586 ↓ 253.5 91020 1

Nested Loop (cost=5.49..2451.49 rows=359 width=241) (actual time=444.731..3079.586 rows=91020 loops=1)

8. 1168.614 2789.272 ↓ 104.1 101068 1

Nested Loop (cost=5.49..2142.57 rows=971 width=245) (actual time=444.713..2789.272 rows=101068 loops=1)

  • Join Filter: (((fenvy.ee_ssp <= 0::numeric) AND (((fenvy.process_period = fstw.month) AND ((fenvy.ee_pay_freq)::text = 'M'::text)) OR ((fenvy.process_period >= fstw.wk_start) AND (fenvy.process_period <= fstw.wk_end) AND ((fenvy.ee_pay_freq)::text = 'W'::text)) OR ((fenvy.process_period >= fstw.tw_start) AND (fenvy.process_period <= fstw.tw_end) AND ((fenvy.ee_pay_freq)::text = 'N'::text)) OR ((fenvy.process_period >= fstw.fw_start) AND (fenvy.process_period <= fstw.fw_end) AND ((fenvy.ee_pay_freq)::text = 'F'::text)))) OR ((fenvy.ee_ssp > 0::numeric) AND (fenvy.process_date >= fstd.month_start_date) AND (fenvy.process_date <= fstd.month_end_date)))
9. 0.695 3.826 ↓ 144.0 144 1

Nested Loop (cost=5.49..42.94 rows=1 width=216) (actual time=0.148..3.826 rows=144 loops=1)

10. 0.640 2.267 ↓ 144.0 144 1

Nested Loop (cost=5.49..42.66 rows=1 width=198) (actual time=0.132..2.267 rows=144 loops=1)

  • Join Filter: (smp.smp_taxyear_id = fst.taxyear_id)
11. 0.043 0.043 ↓ 1.1 12 1

Index Scan using ft_sty_u3 on ft_sys_taxyear fst (cost=0.00..12.42 rows=11 width=38) (actual time=0.020..0.043 rows=12 loops=1)

12. 0.368 1.584 ↓ 144.0 144 12

Materialize (cost=5.49..30.08 rows=1 width=160) (actual time=0.009..0.132 rows=144 loops=12)

13. 0.210 1.216 ↓ 144.0 144 1

Nested Loop (cost=5.49..30.07 rows=1 width=160) (actual time=0.109..1.216 rows=144 loops=1)

  • Join Filter: (fstd.month = fstw.month)
14. 0.022 0.022 ↓ 12.0 12 1

Seq Scan on ft_sys_tax_weeks fstw (cost=0.00..1.18 rows=1 width=28) (actual time=0.009..0.022 rows=12 loops=1)

  • Filter: ((month >= 1) AND (month <= 12))
15. 0.464 0.984 ↓ 10.3 144 12

Hash Join (cost=5.49..28.72 rows=14 width=136) (actual time=0.010..0.082 rows=144 loops=12)

  • Hash Cond: (aspb.aspp_bir_taxyear_id = smp.smp_taxyear_id)
16. 0.406 0.504 ↑ 1.8 144 12

Hash Join (cost=4.24..26.38 rows=252 width=76) (actual time=0.007..0.042 rows=144 loops=12)

  • Hash Cond: (aspb.aspp_bir_taxyear_id = fstd.taxyear_id)
17. 0.048 0.048 ↑ 29.2 12 12

Seq Scan on ft_sys_aspp_bir aspb (cost=0.00..13.50 rows=350 width=60) (actual time=0.002..0.004 rows=12 loops=12)

18. 0.025 0.050 ↑ 1.0 144 1

Hash (cost=2.44..2.44 rows=144 width=16) (actual time=0.050..0.050 rows=144 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 7kB
19. 0.025 0.025 ↑ 1.0 144 1

Seq Scan on ft_sys_taxyear_details fstd (cost=0.00..2.44 rows=144 width=16) (actual time=0.008..0.025 rows=144 loops=1)

20. 0.004 0.016 ↓ 1.1 12 1

Hash (cost=1.11..1.11 rows=11 width=60) (actual time=0.016..0.016 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
21. 0.012 0.012 ↓ 1.1 12 1

Seq Scan on ft_sys_smp smp (cost=0.00..1.11 rows=11 width=60) (actual time=0.008..0.012 rows=12 loops=1)

22. 0.864 0.864 ↑ 1.0 1 144

Index Scan using ft_sssp_u1 on ft_sys_ssp ssp (cost=0.00..0.27 rows=1 width=18) (actual time=0.004..0.006 rows=1 loops=144)

  • Index Cond: (ssp_taxyear_id = fst.taxyear_id)
23. 1616.832 1616.832 ↑ 1.3 8422 144

Index Scan using ft_enetvaly_u on ft_ee_net_values_ytd fenvy (cost=0.00..1538.18 rows=11229 width=71) (actual time=6.113..11.228 rows=8422 loops=144)

  • Index Cond: ((ee_er_id = 100) AND ((process_year)::text = (fst.taxyear)::text))
24. 202.136 202.136 ↑ 1.0 1 101068

Index Scan using ft_ee_p on ft_employees fee (cost=0.00..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=101068)

  • Index Cond: (ee_id = fenvy.ee_id)
  • Filter: (((ee_sys_status)::text <> 'D'::text) AND (ee_er_id = 100))
25. 0.000 0.000 ↑ 1.0 1 91020

Materialize (cost=0.00..8.27 rows=1 width=6) (actual time=0.000..0.000 rows=1 loops=91020)

26. 0.018 0.018 ↑ 1.0 1 1

Index Scan using ft_eropt_p on ft_er_options feo (cost=0.00..8.27 rows=1 width=6) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: (er_id = 100)
27. 91.010 91.020 ↓ 1.1 12 91020

Materialize (cost=0.00..1.17 rows=11 width=60) (actual time=0.000..0.001 rows=12 loops=91020)

28. 0.010 0.010 ↓ 1.1 12 1

Seq Scan on ft_sys_spp_adp spa (cost=0.00..1.11 rows=11 width=60) (actual time=0.006..0.010 rows=12 loops=1)

29. 91.006 91.020 ↓ 1.1 12 91020

Materialize (cost=0.00..1.17 rows=11 width=60) (actual time=0.000..0.001 rows=12 loops=91020)

30. 0.014 0.014 ↓ 1.1 12 1

Seq Scan on ft_sys_sap sap (cost=0.00..1.11 rows=11 width=60) (actual time=0.008..0.014 rows=12 loops=1)

31. 91.014 91.020 ↓ 1.1 12 91020

Materialize (cost=0.00..1.17 rows=11 width=60) (actual time=0.000..0.001 rows=12 loops=91020)

32. 0.006 0.006 ↓ 1.1 12 1

Seq Scan on ft_sys_spp_bir spb (cost=0.00..1.11 rows=11 width=60) (actual time=0.006..0.006 rows=12 loops=1)

33. 0.002 0.035 ↑ 1.0 1 1

Materialize (cost=8.28..8.29 rows=1 width=9) (actual time=0.035..0.035 rows=1 loops=1)

34. 0.015 0.033 ↑ 1.0 1 1

Sort (cost=8.28..8.28 rows=1 width=9) (actual time=0.033..0.033 rows=1 loops=1)

  • Sort Key: ft_employers.er_cur_taxyear
  • Sort Method: quicksort Memory: 25kB
35. 0.018 0.018 ↑ 1.0 1 1

Index Scan using ft_er_u1 on ft_employers (cost=0.00..8.27 rows=1 width=9) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: (er_id = 100)