explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1GKS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 327,512.075 ↓ 0.0 0 1

Unique (cost=248.74..248.75 rows=1 width=4) (actual time=327,512.075..327,512.075 rows=0 loops=1)

2. 0.005 327,512.075 ↓ 0.0 0 1

Sort (cost=248.74..248.75 rows=1 width=4) (actual time=327,512.075..327,512.075 rows=0 loops=1)

  • Sort Key: slr_in_out_charges.id
  • Sort Method: quicksort Memory: 25kB
3. 51,066.747 327,512.070 ↓ 0.0 0 1

Nested Loop Left Join (cost=12.22..248.73 rows=1 width=4) (actual time=327,512.070..327,512.070 rows=0 loops=1)

  • Filter: ((hashed SubPlan 1) OR (hashed SubPlan 2))
  • Rows Removed by Filter: 732167019
4. 25.387 73.250 ↓ 97,589.0 97,589 1

Nested Loop Left Join (cost=1.70..237.01 rows=1 width=12) (actual time=0.191..73.250 rows=97,589 loops=1)

5. 0.047 0.478 ↓ 45.0 45 1

Nested Loop Left Join (cost=1.28..236.20 rows=1 width=12) (actual time=0.185..0.478 rows=45 loops=1)

6. 0.013 0.296 ↓ 45.0 45 1

Nested Loop (cost=0.86..234.99 rows=1 width=12) (actual time=0.169..0.296 rows=45 loops=1)

7. 0.010 0.010 ↑ 1.0 1 1

Index Scan using slr_employee_worker_id on slr_employee (cost=0.42..2.64 rows=1 width=4) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (worker_id = 173092)
8. 0.273 0.273 ↓ 45.0 45 1

Index Scan using slr_in_out_charges_employee_id on slr_in_out_charges (cost=0.44..232.35 rows=1 width=16) (actual time=0.158..0.273 rows=45 loops=1)

  • Index Cond: (employee_id = slr_employee.id)
  • Filter: ((NOT no_show_charge) AND (NOT is_death_charge) AND (period_date >= '2018-02-01'::date) AND (period_date <= '2019-01-31'::date) AND (ent_id = 5740))
  • Rows Removed by Filter: 22
9. 0.135 0.135 ↑ 1.0 1 45

Index Only Scan using slr_dict_root_pkey on slr_dict_root t4 (cost=0.42..1.20 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=45)

  • Index Cond: (id = slr_in_out_charges.dict_root_id)
  • Heap Fetches: 0
10. 47.385 47.385 ↓ 197.1 2,168 45

Index Scan using slr_united_dict_dict_root_id on slr_united_dict t5 (cost=0.42..0.70 rows=11 width=8) (actual time=0.006..1.053 rows=2,168 loops=45)

  • Index Cond: (t4.id = dict_root_id)
11. 68,214.711 276,372.048 ↓ 2,501.0 7,503 97,589

Nested Loop Left Join (cost=0.85..2.01 rows=3 width=8) (actual time=0.012..2.832 rows=7,503 loops=97,589)

12. 292.767 292.767 ↑ 1.0 1 97,589

Index Only Scan using slr_dict_root_pkey on slr_dict_root (cost=0.42..1.20 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=97,589)

  • Index Cond: (id = slr_in_out_charges.local_dict_root_id)
  • Heap Fetches: 0
13. 207,864.570 207,864.570 ↓ 682.1 7,503 97,589

Index Scan using slr_united_dict_dict_root_id on slr_united_dict (cost=0.42..0.70 rows=11 width=8) (actual time=0.009..2.130 rows=7,503 loops=97,589)

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

SubPlan (forNested Loop Left Join)

15. 0.000 0.013 ↓ 0.0 0 1

Nested Loop (cost=0.42..4.83 rows=1 width=4) (actual time=0.013..0.013 rows=0 loops=1)

16. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on slr_enterprise_proportion_pay_types u1 (cost=0.00..2.17 rows=1 width=4) (actual time=0.013..0.013 rows=0 loops=1)

  • Filter: (exrtafieldsforenterprise_id = 5165)
  • Rows Removed by Filter: 94
17. 0.000 0.000 ↓ 0.0 0

Index Scan using slr_united_dict_pkey on slr_united_dict u0 (cost=0.42..2.65 rows=1 width=4) (never executed)

  • Index Cond: (id = u1.uniteddict_id)
  • Filter: (ent_id = 5740)
18. 0.001 0.012 ↓ 0.0 0 1

Nested Loop (cost=0.42..4.83 rows=1 width=4) (actual time=0.012..0.012 rows=0 loops=1)

19. 0.011 0.011 ↓ 0.0 0 1

Seq Scan on slr_enterprise_proportion_pay_types u1_1 (cost=0.00..2.17 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=1)

  • Filter: (exrtafieldsforenterprise_id = 5165)
  • Rows Removed by Filter: 94
20. 0.000 0.000 ↓ 0.0 0

Index Scan using slr_united_dict_pkey on slr_united_dict u0_1 (cost=0.42..2.65 rows=1 width=4) (never executed)

  • Index Cond: (id = u1_1.uniteddict_id)
  • Filter: (ent_id = 5740)