explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2fZG

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 2,200.619 ↓ 1.3 102 1

Limit (cost=147,764.71..147,772.71 rows=80 width=1,712) (actual time=2,200.462..2,200.619 rows=102 loops=1)

2. 0.095 2,200.612 ↓ 1.3 102 1

Unique (cost=147,764.71..147,772.71 rows=80 width=1,712) (actual time=2,200.461..2,200.612 rows=102 loops=1)

3. 1.405 2,200.517 ↓ 1.3 102 1

Sort (cost=147,764.71..147,764.91 rows=80 width=1,712) (actual time=2,200.459..2,200.517 rows=102 loops=1)

  • Sort Key: slr_payment_type.name, slr_payment_type.id, ((SubPlan 1)), ((SubPlan 2)), slr_payment_type.begin, slr_payment_type."end", slr_payment_type.use_as, slr_payment_type.dict_root_id, slr_payment_type.united_dict_type, slr_payment_type.un (...)
  • Sort Method: quicksort Memory: 318kB
4. 288.205 2,199.112 ↓ 1.3 102 1

Hash Left Join (cost=77,968.04..147,762.18 rows=80 width=1,712) (actual time=1,442.650..2,199.112 rows=102 loops=1)

  • Hash Cond: (slr_payment_type.dict_root_id = slr_dict_root.id)
  • Filter: (((slr_dict_root.ent_id = 5724) 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_clou (...)
  • Rows Removed by Filter: 409666
5. 335.148 483.438 ↓ 1.4 409,768 1

Hash Join (cost=109.02..55,841.69 rows=284,380 width=1,648) (actual time=1.670..483.438 rows=409,768 loops=1)

  • Hash Cond: (slr_payment_type.payment_type_template_id = slr_payment_type_template.id)
6. 146.649 146.649 ↑ 1.0 431,929 1

Seq Scan on slr_payment_type (cost=0.00..51,268.36 rows=432,136 width=796) (actual time=0.008..146.649 rows=431,929 loops=1)

7. 0.738 1.641 ↓ 1.5 413 1

Hash (cost=105.51..105.51 rows=281 width=852) (actual time=1.641..1.641 rows=413 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 376kB
8. 0.903 0.903 ↓ 1.5 413 1

Seq Scan on slr_payment_type_template (cost=0.00..105.51 rows=281 width=852) (actual time=0.011..0.903 rows=413 loops=1)

  • Filter: ((algorithm_group = ANY ('{1,2,3}'::integer[])) AND ((algorithm_code)::text = ANY ('{PositionSalaryNSOT_2,SalaryCoachesSportNSOT2,AllowanceForLength,AdditionalAllowancePercent,AllowanceForNorth,ClassroomManagem (...)
  • Rows Removed by Filter: 14
9. 335.373 1,422.267 ↓ 1.0 1,069,250 1

Hash (cost=64,620.27..64,620.27 rows=1,059,100 width=13) (actual time=1,422.267..1,422.267 rows=1,069,250 loops=1)

  • Buckets: 2097152 Batches: 1 Memory Usage: 64205kB
10. 700.566 1,086.894 ↓ 1.0 1,069,250 1

Hash Right Join (cost=14,779.65..64,620.27 rows=1,059,100 width=13) (actual time=189.686..1,086.894 rows=1,069,250 loops=1)

  • Hash Cond: (slr_united_dict.dict_root_id = slr_dict_root.id)
11. 198.460 198.460 ↑ 1.0 1,059,065 1

Seq Scan on slr_united_dict (cost=0.00..35,278.00 rows=1,059,100 width=9) (actual time=0.011..198.460 rows=1,059,065 loops=1)

12. 115.197 187.868 ↓ 1.0 495,102 1

Hash (cost=8,591.51..8,591.51 rows=495,051 width=8) (actual time=187.868..187.868 rows=495,102 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 23434kB
13. 72.671 72.671 ↓ 1.0 495,102 1

Seq Scan on slr_dict_root (cost=0.00..8,591.51 rows=495,051 width=8) (actual time=0.025..72.671 rows=495,102 loops=1)

14.          

SubPlan (forHash Left Join)

15. 1.734 3.978 ↑ 1.0 1 102

Aggregate (cost=27.14..27.15 rows=1 width=32) (actual time=0.039..0.039 rows=1 loops=102)

16. 0.402 2.244 ↑ 1.0 2 102

Nested Loop (cost=0.71..27.14 rows=2 width=17) (actual time=0.018..0.022 rows=2 loops=102)

17. 1.122 1.122 ↑ 1.0 2 102

Index Scan using slr_payment_type_group_rec_payment_type_id on slr_payment_type_group_rec gr (cost=0.42..10.51 rows=2 width=4) (actual time=0.010..0.011 rows=2 loops=102)

  • Index Cond: (payment_type_id = slr_payment_type.id)
18. 0.720 0.720 ↑ 1.0 1 180

Index Scan using slr_payment_type_group_pkey on slr_payment_type_group g (cost=0.29..8.30 rows=1 width=21) (actual time=0.003..0.004 rows=1 loops=180)

  • Index Cond: (id = gr.payment_type_group_id)
19. 0.408 1.224 ↑ 1.0 1 102

Aggregate (cost=16.76..16.77 rows=1 width=32) (actual time=0.012..0.012 rows=1 loops=102)

20. 0.114 0.816 ↓ 0.0 0 102

Nested Loop (cost=0.71..16.75 rows=1 width=17) (actual time=0.008..0.008 rows=0 loops=102)

21. 0.612 0.612 ↓ 0.0 0 102

Index Scan using slr_payment_used_group_payment_type_id on slr_payment_used_group ug (cost=0.42..8.44 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=102)

  • Index Cond: (payment_type_id = slr_payment_type.id)
22. 0.090 0.090 ↑ 1.0 1 45

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

  • Index Cond: (id = ug.payment_group_id)