explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ABdo

Settings
# exclusive inclusive rows x rows loops node
1. 13.935 594.192 ↓ 1.3 100 1

Gather (cost=16,152.57..127,833.81 rows=77 width=861) (actual time=214.686..594.192 rows=100 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 278.754 580.117 ↓ 1.1 20 5

Nested Loop Left Join (cost=15,152.57..125,793.22 rows=19 width=797) (actual time=191.178..580.117 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. 52.189 301.360 ↓ 1.2 80,885 5

Hash Left Join (cost=15,152.14..72,258.07 rows=68,208 width=808) (actual time=174.301..301.360 rows=80,885 loops=5)

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

Hash Join (cost=109.96..56,278.03 rows=68,208 width=800) (actual time=0.794..78.025 rows=80,885 loops=5)

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

6. 0.061 0.705 ↓ 1.5 413 5

Hash (cost=106.51..106.51 rows=276 width=7) (actual time=0.705..0.705 rows=413 loops=5)

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

Seq Scan on slr_payment_type_template (cost=0.00..106.51 rows=276 width=7) (actual time=0.031..0.644 rows=413 loops=5)

  • Filter: ((algorithm_group = ANY ('{1,2,3}'::integer[])) AND ((algorithm_code)::text = ANY ('{ManagingStructuralNSOTNew,NormaDayPerHour,WeeklyNSOTLoad,SumSurcharge,PercentSurchargeRound,PositionSalaryNSOT,HighQualityNSOTPayme (...)
  • Rows Removed by Filter: 14
8. 106.752 171.146 ↓ 1.0 488,522 5

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

  • Buckets: 524288 Batches: 1 Memory Usage: 23177kB
9. 64.394 64.394 ↓ 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..64.394 rows=488,522 loops=5)

10. 0.003 0.003 ↑ 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.003 rows=1 loops=404,427)

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

SubPlan (forGather)

12. 0.004 0.096 ↑ 1.0 1 100

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

13. 0.003 0.092 ↑ 1.0 2 100

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

14. 0.087 0.087 ↑ 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.087..0.087 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.002 0.044 ↑ 1.0 1 100

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

17. 0.000 0.042 ↓ 0.0 0 100

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

18. 0.041 0.041 ↓ 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.041..0.041 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.001..0.002 rows=1 loops=46)

  • Index Cond: (id = ug.payment_group_id)