explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hrfy

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 3.966 ↓ 0.0 0 1

Sort (cost=3,668.64..3,668.65 rows=4 width=293) (actual time=3.965..3.966 rows=0 loops=1)

  • Sort Key: component.delivery_date
  • Sort Method: quicksort Memory: 25kB
2. 0.001 3.954 ↓ 0.0 0 1

Nested Loop (cost=1.71..3,668.60 rows=4 width=293) (actual time=3.954..3.954 rows=0 loops=1)

3. 0.001 3.953 ↓ 0.0 0 1

Nested Loop (cost=1.28..3,654.35 rows=4 width=225) (actual time=3.953..3.953 rows=0 loops=1)

4. 0.001 3.952 ↓ 0.0 0 1

Nested Loop (cost=0.85..3,638.58 rows=6 width=229) (actual time=3.952..3.952 rows=0 loops=1)

5. 0.307 3.951 ↓ 0.0 0 1

Nested Loop (cost=0.43..3,559.81 rows=28 width=225) (actual time=3.951..3.951 rows=0 loops=1)

6. 0.697 0.697 ↓ 1.0 421 1

Seq Scan on booking (cost=0.00..63.26 rows=414 width=8) (actual time=0.005..0.697 rows=421 loops=1)

  • Filter: (active AND ((status)::text = 'confirmed'::text))
  • Rows Removed by Filter: 247
7. 2.947 2.947 ↓ 0.0 0 421

Index Scan using component_enquiry_id_idx on component (cost=0.43..8.44 rows=1 width=217) (actual time=0.007..0.007 rows=0 loops=421)

  • Index Cond: (enquiry_id = booking.enquiry_id)
  • Filter: (active AND ((status IS NULL) OR (status = 'unallocated'::component_status)) AND (allocation_type = 'manual'::allocation_type) AND (component_type = 'job'::component_entity_type) AND (pm_id = ANY ('{308,301,176,184,135,12,76,93,109,162,319,366,339,187,58,84,91,334,186,605,477,514,258,558,311,905,338,209,219,44,214,136,130}'::integer[])))
  • Rows Removed by Filter: 1
8. 0.000 0.000 ↓ 0.0 0

Index Scan using orders_component_id_index on orders (cost=0.43..2.80 rows=1 width=4) (never executed)

  • Index Cond: (component_id = component.id)
  • Filter: (active AND (sent_to_client_date IS NULL) AND (status = 'quote-accepted'::order_status))
9. 0.000 0.000 ↓ 0.0 0

Index Scan using enquiry_pkey on enquiry (cost=0.43..2.63 rows=1 width=8) (never executed)

  • Index Cond: (id = component.enquiry_id)
  • Filter: active
10. 0.000 0.000 ↓ 0.0 0

Index Scan using component_component_id_idx on component_extended (cost=0.43..3.54 rows=1 width=159) (never executed)

  • Index Cond: (component_id = orders.component_id)
  • Filter: active