explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KTPj

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Group (cost=26,361.64..26,786.60 rows=3,766 width=22) (actual rows= loops=)

  • Group Key: equipment.id, rent_account.id, good.subtype, rent_account_good.id, rent_account_task.id
2. 0.000 0.000 ↓ 0.0

Gather Merge (cost=26,361.64..26,747.38 rows=3,138 width=22) (actual rows= loops=)

  • Workers Planned: 2
3. 0.000 0.000 ↓ 0.0

Group (cost=25,361.62..25,385.15 rows=1,569 width=22) (actual rows= loops=)

  • Group Key: equipment.id, rent_account.id, good.subtype, rent_account_good.id, rent_account_task.id
4. 0.000 0.000 ↓ 0.0

Sort (cost=25,361.62..25,365.54 rows=1,569 width=22) (actual rows= loops=)

  • Sort Key: equipment.id, rent_account.id, good.subtype, rent_account_good.id, rent_account_task.id
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=4,276.91..25,278.34 rows=1,569 width=22) (actual rows= loops=)

  • Hash Cond: (equipment.good_id = good.id)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4,129.71..25,127.01 rows=1,569 width=20) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4,129.29..23,687.60 rows=3,122 width=16) (actual rows= loops=)

  • Join Filter: (rent_account_good.id = rent_account_equipment.account_good_id)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4,128.87..22,762.40 rows=870 width=16) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4,128.45..21,924.04 rows=1,758 width=16) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4,128.02..21,080.45 rows=1,758 width=16) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=4,127.60..20,174.44 rows=1,038 width=8) (actual rows= loops=)

  • Hash Cond: (rent_account_good.account_id = rent_account.id)
12. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on rent_account_good (cost=0.00..15,968.56 rows=29,817 width=8) (actual rows= loops=)

  • Filter: (return_task_completed_datetime IS NULL)
13. 0.000 0.000 ↓ 0.0

Hash (cost=4,102.22..4,102.22 rows=2,030 width=4) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on rent_account (cost=0.00..4,102.22 rows=2,030 width=4) (actual rows= loops=)

  • Filter: (((type)::text = 'external'::text) AND ((status)::text = 'in_progress'::text))
15. 0.000 0.000 ↓ 0.0

Index Scan using ratg_rag_rag_id on ratg_rag (cost=0.42..0.85 rows=2 width=8) (actual rows= loops=)

  • Index Cond: (rag_id = rent_account_good.id)
16. 0.000 0.000 ↓ 0.0

Index Scan using rent_account_task_good_pkey on rent_account_task_good (cost=0.42..0.48 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = ratg_rag.ratg_id)
17. 0.000 0.000 ↓ 0.0

Index Scan using rent_account_task_pkey on rent_account_task (cost=0.42..0.48 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = rent_account_task_good.task_id)
  • Filter: (((type)::text = 'transfer'::text) AND ((status)::text = 'completed'::text))
18. 0.000 0.000 ↓ 0.0

Index Scan using rent_account_equipment_account_good_id on rent_account_equipment (cost=0.43..0.84 rows=18 width=8) (actual rows= loops=)

  • Index Cond: (account_good_id = ratg_rag.rag_id)
19. 0.000 0.000 ↓ 0.0

Index Scan using equipment_pkey on equipment (cost=0.42..0.46 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = rent_account_equipment.equipment_id)
  • Filter: ((status)::text = 'in_use'::text)
20. 0.000 0.000 ↓ 0.0

Hash (cost=128.20..128.20 rows=1,520 width=10) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on good (cost=0.00..128.20 rows=1,520 width=10) (actual rows= loops=)