explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0UNh

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 1,927.749 ↑ 1.8 49 1

Limit (cost=107,442.98..107,451.98 rows=90 width=1,730) (actual time=1,927.662..1,927.749 rows=49 loops=1)

2. 0.046 1,927.741 ↑ 1.8 49 1

Unique (cost=107,442.98..107,451.98 rows=90 width=1,730) (actual time=1,927.660..1,927.741 rows=49 loops=1)

3. 0.341 1,927.695 ↑ 1.8 49 1

Sort (cost=107,442.98..107,443.20 rows=90 width=1,730) (actual time=1,927.659..1,927.695 rows=49 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: 118kB
4. 64.433 1,927.354 ↑ 1.8 49 1

Hash Join (cost=51,794.87..107,440.06 rows=90 width=1,730) (actual time=1,661.770..1,927.354 rows=49 loops=1)

  • Hash Cond: (slr_payment_type.payment_type_template_id = slr_payment_type_template.id)
  • Join Filter: (((slr_dict_root.ent_id = 4085) 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 (...)
  • Rows Removed by Join Filter: 282613
5. 467.174 1,780.070 ↑ 2.6 297,736 1

Hash Right Join (cost=51,695.25..92,932.02 rows=780,448 width=779) (actual time=1,120.892..1,780.070 rows=297,736 loops=1)

  • Hash Cond: (slr_united_dict.dict_root_id = slr_dict_root.id)
6. 194.017 194.017 ↓ 1.0 893,113 1

Seq Scan on slr_united_dict (cost=0.00..30,083.12 rows=893,112 width=9) (actual time=0.015..194.017 rows=893,113 loops=1)

7. 424.735 1,118.879 ↑ 1.0 297,735 1

Hash (cost=47,972.30..47,972.30 rows=297,836 width=778) (actual time=1,118.879..1,118.879 rows=297,735 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 240861kB
8. 304.797 694.144 ↑ 1.0 297,735 1

Hash Left Join (cost=10,175.70..47,972.30 rows=297,836 width=778) (actual time=178.675..694.144 rows=297,735 loops=1)

  • Hash Cond: (slr_payment_type.dict_root_id = slr_dict_root.id)
9. 213.563 213.563 ↑ 1.0 297,735 1

Seq Scan on slr_payment_type (cost=0.00..33,701.36 rows=297,836 width=770) (actual time=0.020..213.563 rows=297,735 loops=1)

10. 101.212 175.784 ↓ 1.0 340,832 1

Hash (cost=5,915.31..5,915.31 rows=340,831 width=8) (actual time=175.783..175.784 rows=340,832 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 17408kB
11. 74.572 74.572 ↓ 1.0 340,832 1

Seq Scan on slr_dict_root (cost=0.00..5,915.31 rows=340,831 width=8) (actual time=0.020..74.572 rows=340,832 loops=1)

12. 0.444 1.168 ↓ 1.5 367 1

Hash (cost=96.53..96.53 rows=247 width=896) (actual time=1.168..1.168 rows=367 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 352kB
13. 0.724 0.724 ↓ 1.5 367 1

Seq Scan on slr_payment_type_template (cost=0.00..96.53 rows=247 width=896) (actual time=0.024..0.724 rows=367 loops=1)

  • Filter: ((algorithm_group = ANY ('{1,2,3}'::integer[])) AND ((algorithm_code)::text = ANY ('{WorkComplexityAllowanceSum,PercentSurcharge,SalaryCoachesSportNSOT2,HeadSalaryNsot,CategorySalaryRounding,RuralAreasWorkPayment,Add (...)
  • Rows Removed by Filter: 14
14.          

SubPlan (forHash Join)

15. 0.294 46.844 ↑ 1.0 1 49

Aggregate (cost=26.47..26.48 rows=1 width=32) (actual time=0.956..0.956 rows=1 loops=49)

16. 0.021 46.550 ↑ 2.0 1 49

Nested Loop (cost=0.71..26.47 rows=2 width=17) (actual time=0.949..0.950 rows=1 loops=49)

17. 38.465 38.465 ↑ 2.0 1 49

Index Scan using slr_payment_type_group_rec_payment_type_id on slr_payment_type_group_rec gr (cost=0.42..9.84 rows=2 width=4) (actual time=0.785..0.785 rows=1 loops=49)

  • Index Cond: (payment_type_id = slr_payment_type.id)
18. 8.064 8.064 ↑ 1.0 1 64

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.125..0.126 rows=1 loops=64)

  • Index Cond: (id = gr.payment_type_group_id)
19. 0.196 34.839 ↑ 1.0 1 49

Aggregate (cost=16.76..16.77 rows=1 width=32) (actual time=0.710..0.711 rows=1 loops=49)

20. 0.001 34.643 ↓ 0.0 0 49

Nested Loop (cost=0.71..16.75 rows=1 width=17) (actual time=0.688..0.707 rows=0 loops=49)

21. 34.594 34.594 ↓ 0.0 0 49

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.687..0.706 rows=0 loops=49)

  • Index Cond: (payment_type_id = slr_payment_type.id)
22. 0.048 0.048 ↑ 1.0 1 24

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=24)

  • Index Cond: (id = ug.payment_group_id)