explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rJQB

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

Append (cost=76.05..148.67 rows=3 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Unique (cost=76.05..76.05 rows=1 width=32) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=76.05..76.05 rows=1 width=32) (actual rows= loops=)

  • Sort Key: ((((((container_sizes.container_size)::text || ' ('::text) || (container_types.container_type)::text) || ') '::text) || (container_classes.container_class)::text))
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=53.45..76.04 rows=1 width=32) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=53.31..75.65 rows=1 width=76) (actual rows= loops=)

  • Filter: ((NOT ss.uses_subcontractors_skips) OR (ss.uses_subcontractors_skips IS NULL))
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=53.17..75.48 rows=1 width=80) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=52.75..69.22 rows=1 width=80) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Join (cost=52.62..69.06 rows=1 width=60) (actual rows= loops=)

  • Hash Cond: (cos.container_id_out = containers.container_id)
9. 0.000 0.000 ↓ 0.0

Seq Scan on containers_on_site cos (cost=0.00..13.31 rows=831 width=8) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=52.58..52.58 rows=3 width=60) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=3.32..52.58 rows=3 width=60) (actual rows= loops=)

  • Hash Cond: ((containers.container_size_id = container_sizes.container_size_id) AND (containers.container_class_id = container_sizes.container_class_id))
12. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.73..50.45 rows=67 width=48) (actual rows= loops=)

  • Hash Cond: ((containers.container_class_id = container_types.container_class_id) AND (containers.container_type_id = container_types.container_type_id))
13. 0.000 0.000 ↓ 0.0

Seq Scan on containers (cost=0.00..33.46 rows=1,946 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=1.29..1.29 rows=29 width=40) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on container_types (cost=0.00..1.29 rows=29 width=40) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=1.24..1.24 rows=24 width=12) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on container_sizes (cost=0.00..1.24 rows=24 width=12) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using container_classes_pkey on container_classes (cost=0.13..0.15 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (container_class_id = containers.container_class_id)
19. 0.000 0.000 ↓ 0.0

Index Scan using orders_pkey on orders o (cost=0.42..6.25 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (order_id = cos.order_id)
  • Filter: ((subcontractor_id = 0) OR (subcontractor_id IS NULL))
20. 0.000 0.000 ↓ 0.0

Index Scan using subcontracted_skips_order_id on subcontracted_skips ss (cost=0.14..0.15 rows=1 width=5) (actual rows= loops=)

  • Index Cond: (o.order_parent_id = order_id)
21. 0.000 0.000 ↓ 0.0

Index Scan using vehicle_type_accepts_container_size_id_idx on vehicle_type_accepts vta (cost=0.14..0.35 rows=2 width=4) (actual rows= loops=)

  • Index Cond: (container_size_id = containers.container_size_id)
  • Filter: (vehicle_type_id = 2)
22. 0.000 0.000 ↓ 0.0

Unique (cost=72.57..72.58 rows=2 width=32) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Sort (cost=72.57..72.58 rows=2 width=32) (actual rows= loops=)

  • Sort Key: ((((((container_sizes_1.container_size)::text || ' ('::text) || (container_types_1.container_type)::text) || ') '::text) || (container_classes_1.container_class)::text))
24. 0.000 0.000 ↓ 0.0

Nested Loop (cost=53.18..72.56 rows=2 width=32) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=53.03..72.16 rows=1 width=76) (actual rows= loops=)

  • Filter: ((bin_contract_containers.sub_service_types <> '{7001,7002,7006,7007,7100,7005,7009,7200}'::smallint[]) OR (bin_contract_containers.sub_service_types IS NULL))
26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=52.75..71.55 rows=1 width=80) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Hash Join (cost=52.62..71.39 rows=1 width=60) (actual rows= loops=)

  • Hash Cond: (bs.container_id = containers_1.container_id)
28. 0.000 0.000 ↓ 0.0

Seq Scan on bins_on_site bs (cost=0.00..15.28 rows=928 width=8) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Hash (cost=52.58..52.58 rows=3 width=60) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash Join (cost=3.32..52.58 rows=3 width=60) (actual rows= loops=)

  • Hash Cond: ((containers_1.container_size_id = container_sizes_1.container_size_id) AND (containers_1.container_class_id = container_sizes_1.container_class_id))
31. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.73..50.45 rows=67 width=48) (actual rows= loops=)

  • Hash Cond: ((containers_1.container_class_id = container_types_1.container_class_id) AND (containers_1.container_type_id = container_types_1.container_type_id))
32. 0.000 0.000 ↓ 0.0

Seq Scan on containers containers_1 (cost=0.00..33.46 rows=1,946 width=16) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=1.29..1.29 rows=29 width=40) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on container_types container_types_1 (cost=0.00..1.29 rows=29 width=40) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=1.24..1.24 rows=24 width=12) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on container_sizes container_sizes_1 (cost=0.00..1.24 rows=24 width=12) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Index Scan using container_classes_pkey on container_classes container_classes_1 (cost=0.13..0.15 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (container_class_id = containers_1.container_class_id)
38. 0.000 0.000 ↓ 0.0

Index Scan using bin_contract_container_pkey on bin_contract_containers (cost=0.28..0.59 rows=1 width=37) (actual rows= loops=)

  • Index Cond: (bs.bin_contract_container_id = bin_contract_container_id)
39. 0.000 0.000 ↓ 0.0

Index Scan using vehicle_type_accepts_container_size_id_idx on vehicle_type_accepts vta_1 (cost=0.14..0.35 rows=2 width=4) (actual rows= loops=)

  • Index Cond: (container_size_id = containers_1.container_size_id)
  • Filter: (vehicle_type_id = 2)