explain.depesz.com

A tool for finding a real cause for slow queries.

Result: ARac : P32

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.030 2513.009 ↑ 4.8 12 1

Merge Right Join (cost=1421.68..17863.23 rows=58 width=744) (actual time=196.882..2513.009 rows=12 loops=1)

  • Merge Cond: (fstw.month = a.month)
2. 276.272 2512.952 ↑ 88.4 11 1

GroupAggregate (cost=1420.35..17848.87 rows=972 width=75) (actual time=196.861..2512.952 rows=11 loops=1)

3. 377.673 2236.680 ↓ 24.3 90020 1

Nested Loop (cost=1420.35..17239.60 rows=3702 width=75) (actual time=10.560..2236.680 rows=90020 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)))
4. 0.034 0.195 ↓ 12.0 12 1

Nested Loop (cost=4.21..5.46 rows=1 width=70) (actual time=0.052..0.195 rows=12 loops=1)

5. 0.042 0.101 ↓ 12.0 12 1

Merge Join (cost=4.21..4.28 rows=1 width=40) (actual time=0.045..0.101 rows=12 loops=1)

  • Merge Cond: (fstw.month = fstd.month)
6. 0.017 0.027 ↓ 12.0 12 1

Sort (cost=1.19..1.19 rows=1 width=28) (actual time=0.022..0.027 rows=12 loops=1)

  • Sort Key: fstw.month
  • Sort Method: quicksort Memory: 25kB
7. 0.010 0.010 ↓ 12.0 12 1

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

  • Filter: ((month >= 1) AND (month <= 12))
8. 0.017 0.032 ↑ 1.0 12 1

Sort (cost=3.02..3.05 rows=12 width=16) (actual time=0.020..0.032 rows=12 loops=1)

  • Sort Key: fstd.month
  • Sort Method: quicksort Memory: 25kB
9. 0.015 0.015 ↑ 1.0 12 1

Seq Scan on ft_sys_taxyear_details fstd (cost=0.00..2.80 rows=12 width=16) (actual time=0.014..0.015 rows=12 loops=1)

  • Filter: (taxyear_id = 12)
10. 0.060 0.060 ↑ 1.0 1 12

Seq Scan on ft_sys_taxyear fst (cost=0.00..1.17 rows=1 width=38) (actual time=0.004..0.005 rows=1 loops=12)

  • Filter: (((taxyear)::text = '20122013'::text) AND (taxyear_id = 12))
11. 579.307 1858.812 ↓ 2.6 90020 12

Hash Join (cost=1416.14..15569.32 rows=35049 width=81) (actual time=2.049..154.901 rows=90020 loops=12)

  • Hash Cond: (fenvy.ee_id = fee.ee_id)
12. 1270.680 1270.680 ↓ 1.1 100068 12

Seq Scan on ft_ee_net_values_ytd fenvy (cost=0.00..12377.61 rows=95005 width=85) (actual time=1.308..105.890 rows=100068 loops=12)

  • Filter: ((ee_er_id = 100) AND ((process_year)::text = '20122013'::text))
13. 1.599 8.825 ↑ 1.0 10003 1

Hash (cost=1290.83..1290.83 rows=10025 width=8) (actual time=8.825..8.825 rows=10003 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 391kB
14. 6.584 7.226 ↑ 1.0 10003 1

Bitmap Heap Scan on ft_employees fee (cost=234.45..1290.83 rows=10025 width=8) (actual time=0.687..7.226 rows=10003 loops=1)

  • Recheck Cond: (ee_er_id = 100)
  • Filter: ((ee_sys_status)::text <> 'D'::text)
15. 0.642 0.642 ↑ 1.0 10003 1

Bitmap Index Scan on ft_ee_u1 (cost=0.00..231.94 rows=10092 width=0) (actual time=0.642..0.642 rows=10003 loops=1)

  • Index Cond: (ee_er_id = 100)
16. 0.024 0.027 ↑ 1.0 12 1

Sort (cost=1.34..1.37 rows=12 width=4) (actual time=0.017..0.027 rows=12 loops=1)

  • Sort Key: a.month
  • Sort Method: quicksort Memory: 25kB
17. 0.003 0.003 ↑ 1.0 12 1

Seq Scan on ft_sys_tax_weeks a (cost=0.00..1.12 rows=12 width=4) (actual time=0.002..0.003 rows=12 loops=1)