explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vDi : Optimization for: plan #zuc5

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 14.575 671.964 ↓ 1.3 100 1

Gather (cost=16,138.99..127,823.67 rows=77 width=861) (actual time=231.984..671.964 rows=100 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 318.796 657.368 ↓ 1.1 20 5

Nested Loop Left Join (cost=15,138.99..125,783.08 rows=19 width=797) (actual time=213.254..657.368 rows=20 loops=5)

  • Filter: (((slr_dict_root.ent_id = 2987) AND (slr_payment_type_template.algorithm_group <> 5) AND (NOT slr_payment_type_template.hidden) AND ((NOT slr_united_dict.hidden) OR (slr_united_dict.id IS NULL))) OR slr_payment_type.is_from_cloud)
  • Rows Removed by Filter: 80865
3. 59.764 338.568 ↓ 1.2 80,885 5

Hash Left Join (cost=15,138.57..72,244.50 rows=68,208 width=808) (actual time=193.659..338.568 rows=80,885 loops=5)

  • Hash Cond: (slr_payment_type.dict_root_id = slr_dict_root.id)
4. 68.226 88.714 ↓ 1.2 80,885 5

Hash Join (cost=96.39..56,264.45 rows=68,208 width=800) (actual time=1.137..88.714 rows=80,885 loops=5)

  • Hash Cond: (slr_payment_type.payment_type_template_id = slr_payment_type_template.id)
5. 19.437 19.437 ↑ 1.2 85,251 5

Parallel Seq Scan on slr_payment_type (cost=0.00..55,090.25 rows=105,526 width=797) (actual time=0.003..19.437 rows=85,251 loops=5)

6. 0.066 1.051 ↓ 1.5 413 5

Hash (cost=92.94..92.94 rows=276 width=7) (actual time=1.051..1.051 rows=413 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
7. 0.985 0.985 ↓ 1.5 413 5

Index Scan using slr_payment_type_template_algorithm_code on slr_payment_type_template (cost=0.27..92.94 rows=276 width=7) (actual time=0.031..0.985 rows=413 loops=5)

  • Index Cond: ((algorithm_code)::text = ANY ('{ManagingStructuralNSOTNew,NormaDayPerHour,WeeklyNSOTLoad,SumSurcharge,PercentSurchargeRound,PositionSalaryNSOT,HighQualityNSOTPayment,SummarySurchargeByTimesheet,WorkComplexityAll (...)
  • Filter: (algorithm_group = ANY ('{1,2,3}'::integer[]))
8. 122.179 190.090 ↓ 1.0 488,522 5

Hash (cost=9,035.97..9,035.97 rows=480,497 width=8) (actual time=190.090..190.090 rows=488,522 loops=5)

  • Buckets: 524288 Batches: 1 Memory Usage: 23177kB
9. 67.911 67.911 ↓ 1.0 488,522 5

Seq Scan on slr_dict_root (cost=0.00..9,035.97 rows=480,497 width=8) (actual time=0.014..67.911 rows=488,522 loops=5)

10. 0.004 0.004 ↑ 9.0 1 404,427

Index Scan using slr_united_dict_dict_root_id on slr_united_dict (cost=0.42..0.65 rows=9 width=9) (actual time=0.004..0.004 rows=1 loops=404,427)

  • Index Cond: (slr_dict_root.id = dict_root_id)
11.          

SubPlan (forGather)

12. 0.005 0.014 ↑ 1.0 1 100

Aggregate (cost=8.24..8.25 rows=1 width=32) (actual time=0.014..0.014 rows=1 loops=100)

13. 0.003 0.009 ↑ 1.0 2 100

Nested Loop (cost=0.71..8.23 rows=2 width=17) (actual time=0.006..0.009 rows=2 loops=100)

14. 0.004 0.004 ↑ 1.0 2 100

Index Scan using slr_payment_type_group_rec_payment_type_id on slr_payment_type_group_rec gr (cost=0.42..3.20 rows=2 width=4) (actual time=0.003..0.004 rows=2 loops=100)

  • Index Cond: (payment_type_id = slr_payment_type.id)
15. 0.002 0.002 ↑ 1.0 1 186

Index Scan using slr_payment_type_group_pkey on slr_payment_type_group g (cost=0.29..2.51 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=186)

  • Index Cond: (id = gr.payment_type_group_id)
16. 0.003 0.007 ↑ 1.0 1 100

Aggregate (cost=5.16..5.17 rows=1 width=32) (actual time=0.007..0.007 rows=1 loops=100)

17. 0.000 0.004 ↓ 0.0 0 100

Nested Loop (cost=0.71..5.15 rows=1 width=17) (actual time=0.004..0.004 rows=0 loops=100)

18. 0.003 0.003 ↓ 0.0 0 100

Index Scan using slr_payment_used_group_payment_type_id on slr_payment_used_group ug (cost=0.42..2.64 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=100)

  • Index Cond: (payment_type_id = slr_payment_type.id)
19. 0.002 0.002 ↑ 1.0 1 46

Index Scan using slr_payment_type_group_pkey on slr_payment_type_group g_1 (cost=0.29..2.51 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=46)

  • Index Cond: (id = ug.payment_group_id)