explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mdjh

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

Nested Loop (cost=2,791.38..2,795.41 rows=1 width=4) (actual time=0.039..0.039 rows=0 loops=1)

  • Buffers: shared hit=2
2.          

Initplan (forNested Loop)

3. 0.011 0.011 ↓ 0.0 0 1

Seq Scan on import_standard import_standard_1 (cost=0.00..2.28 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=1)

  • Filter: (import_id = 5)
  • Rows Removed by Filter: 111
  • Buffers: shared hit=1
4. 0.001 0.038 ↓ 0.0 0 1

HashAggregate (cost=2,788.81..2,788.82 rows=1 width=8) (actual time=0.038..0.038 rows=0 loops=1)

  • Group Key: rate_1.id
  • Buffers: shared hit=2
5. 0.000 0.037 ↓ 0.0 0 1

Nested Loop (cost=1,191.24..2,788.81 rows=1 width=8) (actual time=0.037..0.037 rows=0 loops=1)

  • Join Filter: (import_standard.import_id = import.id)
  • Buffers: shared hit=2
6. 0.001 0.037 ↓ 0.0 0 1

Nested Loop (cost=1,191.09..2,788.50 rows=1 width=20) (actual time=0.037..0.037 rows=0 loops=1)

  • Join Filter: (rate_1.import_id = import_standard.import_id)
  • Buffers: shared hit=2
7. 0.001 0.036 ↓ 0.0 0 1

Merge Join (cost=9.38..9.63 rows=5 width=8) (actual time=0.036..0.036 rows=0 loops=1)

  • Merge Cond: (import_standard.import_id = old_import.import_id)
  • Buffers: shared hit=2
8. 0.004 0.035 ↓ 0.0 0 1

Sort (cost=2.71..2.76 rows=20 width=4) (actual time=0.035..0.035 rows=0 loops=1)

  • Sort Key: import_standard.import_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2
9. 0.031 0.031 ↓ 0.0 0 1

Seq Scan on import_standard (cost=0.00..2.28 rows=20 width=4) (actual time=0.030..0.031 rows=0 loops=1)

  • Filter: (transport_type_id = $0)
  • Rows Removed by Filter: 111
  • Buffers: shared hit=2
10. 0.000 0.000 ↓ 0.0 0

Sort (cost=6.67..6.73 rows=24 width=4) (never executed)

  • Sort Key: old_import.import_id
11. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=5.88..6.12 rows=24 width=4) (never executed)

  • Group Key: old_import.import_id
12. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=2.71..5.82 rows=24 width=4) (never executed)

  • Hash Cond: (old_import.traject_type_id = new_import.traject_type_id)
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on import_has_traject_type old_import (cost=0.00..2.36 rows=136 width=8) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.70..2.70 rows=1 width=4) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Seq Scan on import_has_traject_type new_import (cost=0.00..2.70 rows=1 width=4) (never executed)

  • Filter: (import_id = 5)
16. 0.000 0.000 ↓ 0.0 0

Materialize (cost=1,181.71..2,778.80 rows=1 width=12) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1,181.71..2,778.79 rows=1 width=12) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=1,181.42..2,778.38 rows=1 width=4) (never executed)

  • Hash Cond: (rate_detail.id = rate_standard_has_unit.rate_standard_id)
  • Filter: ((NOT (rate_standard_has_unit.unit_id IS DISTINCT FROM 5)) AND (NOT (rate_standard_has_unit.amount IS DISTINCT FROM '5'::double precision)))
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on rate_detail (cost=0.00..797.00 rows=44,000 width=8) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Hash (cost=652.30..652.30 rows=42,330 width=16) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Seq Scan on rate_standard_has_unit (cost=0.00..652.30 rows=42,330 width=16) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Index Scan using rate_id_pk on rate rate_1 (cost=0.29..0.41 rows=1 width=8) (never executed)

  • Index Cond: (id = rate_detail.rate_id)
  • Filter: (valid AND ('2019-01-01 00:00:00'::timestamp without time zone < valid_from) AND ('2019-01-01 00:00:00'::timestamp without time zone > valid_from) AND (NOT (load_country_id IS DISTINCT FROM 5)) AND (NOT (load_department_id IS DISTINCT FROM 5)) AND (NOT (load_place_id IS DISTINCT FROM 5)) AND (NOT (load_region_id IS DISTINCT FROM 5)) AND (NOT (delivery_country_id IS DISTINCT FROM 5)) AND (NOT (delivery_department_id IS DISTINCT FROM 5)) AND (NOT (delivery_place_id IS DISTINCT FROM 5)) AND (NOT (delivery_region_id IS DISTINCT FROM 5)))
23. 0.000 0.000 ↓ 0.0 0

Index Scan using import_pkey on import (cost=0.14..0.29 rows=1 width=4) (never executed)

  • Index Cond: (id = old_import.import_id)
  • Filter: ((id <> 5) AND (NOT (shipping_company_id IS DISTINCT FROM 5)) AND (rate_type = 'STANDARD'::rates.ratetype))
24. 0.000 0.000 ↓ 0.0 0

Index Only Scan using rate_id_pk on rate (cost=0.29..4.31 rows=1 width=4) (never executed)

  • Index Cond: (id = rate_detail.rate_id)
  • Heap Fetches: 0