explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zuc5

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 13.725 651.250 ↓ 1.3 100 1

Gather (cost=16,139.00..127,823.67 rows=77 width=861) (actual time=211.637..651.250 rows=100 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 315.863 637.401 ↓ 1.1 20 5

Nested Loop Left Join (cost=15,139.00..125,783.09 rows=19 width=797) (actual time=201.268..637.401 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. 62.319 321.534 ↓ 1.2 80,885 5

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

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

Hash Join (cost=96.39..56,264.46 rows=68,208 width=800) (actual time=0.903..83.795 rows=80,885 loops=5)

  • Hash Cond: (slr_payment_type.payment_type_template_id = slr_payment_type_template.id)
5. 18.559 18.559 ↑ 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..18.559 rows=85,251 loops=5)

6. 0.056 0.818 ↓ 1.5 413 5

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

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
7. 0.762 0.762 ↓ 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.029..0.762 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. 115.050 175.420 ↓ 1.0 488,522 5

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

  • Buckets: 524288 Batches: 1 Memory Usage: 23177kB
9. 60.370 60.370 ↓ 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.013..60.370 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.003..0.004 rows=1 loops=404,427)

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

SubPlan (forGather)

12. 0.007 0.076 ↑ 1.0 1 100

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

13. 0.010 0.069 ↑ 1.0 2 100

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

14. 0.049 0.049 ↑ 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.030..0.049 rows=2 loops=100)

  • Index Cond: (payment_type_id = slr_payment_type.id)
15. 0.010 0.010 ↑ 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.010..0.010 rows=1 loops=186)

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

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

17. 0.000 0.046 ↓ 0.0 0 100

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

18. 0.044 0.044 ↓ 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.044..0.044 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)