explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6LA

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.010 2.498 ↓ 0.0 0 1

Sort (cost=3,668.63..3,668.64 rows=4 width=293) (actual time=2.498..2.498 rows=0 loops=1)

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

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

3. 0.001 2.488 ↓ 0.0 0 1

Nested Loop (cost=1.28..3,654.33 rows=4 width=225) (actual time=2.487..2.488 rows=0 loops=1)

4. 0.000 2.487 ↓ 0.0 0 1

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

5. 0.073 2.487 ↓ 0.0 0 1

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

6. 0.324 0.324 ↓ 1.0 418 1

Seq Scan on booking (cost=0.00..63.26 rows=414 width=8) (actual time=0.006..0.324 rows=418 loops=1)

  • Filter: (active AND ((status)::text = 'confirmed'::text))
  • Rows Removed by Filter: 246
7. 2.090 2.090 ↓ 0.0 0 418

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

  • 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
Planning time : 1.719 ms
Execution time : 2.615 ms