explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rrB4 : SFT_EE_R_WORKER_NONCATEGORY_MOD_04

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 176.044 ↑ 1.0 1 1

Limit (cost=116,907.07..116,907.07 rows=1 width=854) (actual time=176.043..176.044 rows=1 loops=1)

2. 0.007 176.040 ↑ 1.0 1 1

Sort (cost=116,907.07..116,907.07 rows=1 width=854) (actual time=176.040..176.040 rows=1 loops=1)

  • Sort Key: fenvy.payslip_id DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.012 176.033 ↑ 1.0 1 1

WindowAgg (cost=116,318.96..116,907.05 rows=1 width=854) (actual time=176.031..176.033 rows=1 loops=1)

4.          

CTE fee

5. 5.127 5.464 ↓ 1.5 853 1

Bitmap Heap Scan on ft_employees (cost=20.97..2,171.32 rows=551 width=43) (actual time=0.437..5.464 rows=853 loops=1)

  • Recheck Cond: (ee_er_id = 23090)
  • Filter: ((ee_sys_status)::text <> 'D'::text)
  • Rows Removed by Filter: 5
  • Heap Blocks: exact=570
6. 0.337 0.337 ↓ 1.5 858 1

Bitmap Index Scan on ft_ee_u1 (cost=0.00..20.83 rows=588 width=0) (actual time=0.337..0.337 rows=858 loops=1)

  • Index Cond: (ee_er_id = 23090)
7.          

CTE fenvy

8. 23.815 91.058 ↑ 22.4 839 1

HashAggregate (cost=66,511.37..66,699.55 rows=18,818 width=16) (actual time=90.683..91.058 rows=839 loops=1)

  • Group Key: feenvy.ee_er_id, feenvy.ee_id
9. 67.243 67.243 ↓ 1.0 19,104 1

Index Scan using ft_enetvaly_i2 on ft_ee_net_values_ytd feenvy (cost=0.56..66,321.35 rows=19,002 width=16) (actual time=0.103..67.243 rows=19,104 loops=1)

  • Index Cond: (ee_er_id = 23090)
10.          

CTE feew

11. 77.306 77.306 ↑ 106.3 6 1

Index Scan using ft_ee_wppy_p on ft_ee_wpp_ytd (cost=0.43..47,360.33 rows=638 width=26) (actual time=73.730..77.306 rows=6 loops=1)

  • Index Cond: (ee_er_id = 23090)
  • Filter: (((ej_flag)::text = 'N'::text) AND ((wor_flag)::text = 'N'::text) AND ((jh_flag)::text = 'N'::text))
  • Rows Removed by Filter: 5640
12. 0.185 176.021 ↑ 1.0 1 1

Hash Join (cost=87.75..675.83 rows=1 width=842) (actual time=175.877..176.021 rows=1 loops=1)

  • Hash Cond: ((fenvy.ee_id = fee.ee_id) AND (fenvy.ee_er_id = fee.ee_er_id) AND (fenvy.payslip_id = feew.ee_payslip_id))
13. 91.347 91.347 ↑ 22.4 839 1

CTE Scan on fenvy (cost=0.00..376.36 rows=18,818 width=16) (actual time=90.688..91.347 rows=839 loops=1)

14. 0.010 84.489 ↑ 1.5 6 1

Hash (cost=87.60..87.60 rows=9 width=850) (actual time=84.489..84.489 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.149 84.479 ↑ 1.5 6 1

Merge Join (cost=78.59..87.60 rows=9 width=850) (actual time=84.474..84.479 rows=6 loops=1)

  • Merge Cond: ((fee.ee_id = feew.ee_id) AND (fee.ee_er_id = feew.ee_er_id))
16. 0.808 6.973 ↓ 1.5 836 1

Sort (cost=36.11..37.48 rows=551 width=806) (actual time=6.775..6.973 rows=836 loops=1)

  • Sort Key: fee.ee_id, fee.ee_er_id
  • Sort Method: quicksort Memory: 134kB
17. 6.165 6.165 ↓ 1.5 853 1

CTE Scan on fee (cost=0.00..11.02 rows=551 width=806) (actual time=0.441..6.165 rows=853 loops=1)

18. 0.030 77.357 ↑ 106.3 6 1

Sort (cost=42.48..44.08 rows=638 width=44) (actual time=77.356..77.357 rows=6 loops=1)

  • Sort Key: feew.ee_id, feew.ee_er_id
  • Sort Method: quicksort Memory: 25kB
19. 77.327 77.327 ↑ 106.3 6 1

CTE Scan on feew (cost=0.00..12.76 rows=638 width=44) (actual time=73.737..77.327 rows=6 loops=1)