explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JBX8 : Optimization for: Optimization for: plan #wKs; plan #huLj

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.166 32.256 ↓ 61.0 61 1

Sort (cost=16,819.31..16,819.32 rows=1 width=765) (actual time=32.239..32.256 rows=61 loops=1)

  • Sort Key: cd.expected_end_date
  • Sort Method: quicksort Memory: 76kB
2. 0.112 32.090 ↓ 61.0 61 1

Nested Loop Left Join (cost=302.33..16,819.30 rows=1 width=765) (actual time=1.431..32.090 rows=61 loops=1)

3. 0.091 31.856 ↓ 61.0 61 1

Nested Loop (cost=302.05..16,818.99 rows=1 width=1,094) (actual time=1.416..31.856 rows=61 loops=1)

4. 0.091 31.521 ↓ 61.0 61 1

Nested Loop (cost=301.63..16,818.20 rows=1 width=1,084) (actual time=1.403..31.521 rows=61 loops=1)

5. 0.104 31.369 ↓ 61.0 61 1

Nested Loop (cost=301.50..16,817.94 rows=1 width=1,084) (actual time=1.395..31.369 rows=61 loops=1)

6. 0.092 31.204 ↓ 61.0 61 1

Nested Loop (cost=301.35..16,817.66 rows=1 width=1,048) (actual time=1.387..31.204 rows=61 loops=1)

7. 0.093 30.929 ↓ 61.0 61 1

Nested Loop (cost=300.92..16,809.26 rows=1 width=1,040) (actual time=1.376..30.929 rows=61 loops=1)

8. 0.110 30.653 ↓ 61.0 61 1

Nested Loop (cost=300.50..16,808.76 rows=1 width=982) (actual time=1.367..30.653 rows=61 loops=1)

9. 0.648 30.327 ↓ 10.8 108 1

Nested Loop (cost=300.23..16,805.77 rows=10 width=925) (actual time=1.355..30.327 rows=108 loops=1)

10. 0.813 27.942 ↓ 12.6 579 1

Hash Join (cost=299.80..16,082.15 rows=46 width=782) (actual time=1.341..27.942 rows=579 loops=1)

  • Hash Cond: (c.subject_area_id = sa.id)
11. 25.834 25.834 ↓ 6.7 1,986 1

Index Scan using component_status_type on component c (cost=0.43..15,782.00 rows=297 width=356) (actual time=0.027..25.834 rows=1,986 loops=1)

  • Index Cond: ((component_type = 'job'::component_entity_type) AND (status = 'allocated'::component_status))
  • Filter: (active AND (title IS NOT NULL) AND (file_type = ANY ('{default,tex}'::allocation_file_type[])) AND (allocation_type = 'job_board'::allocation_type))
  • Rows Removed by Filter: 2,094
12. 0.162 1.295 ↑ 1.2 220 1

Hash (cost=296.19..296.19 rows=254 width=434) (actual time=1.294..1.295 rows=220 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 111kB
13. 1.133 1.133 ↑ 1.2 220 1

Seq Scan on subject_area sa (cost=0.00..296.19 rows=254 width=434) (actual time=0.016..1.133 rows=220 loops=1)

  • Filter: (active AND (((data ->> 'sa1_6'::text))::integer = ANY ('{68,67,135,70,69,71,72,157,156,65,146,131,147,132,73,130,78,74,76,77,149,150,79,129,159,75,133,66,155,148,134}'::integer[])))
  • Rows Removed by Filter: 1,419
14. 1.737 1.737 ↓ 0.0 0 579

Index Scan using component_detail_component_id_idx on component_detail cd (cost=0.43..15.72 rows=1 width=147) (actual time=0.003..0.003 rows=0 loops=579)

  • Index Cond: (component_id = c.id)
  • Filter: (active AND (wb_user_id IS NULL))
  • Rows Removed by Filter: 1
15. 0.216 0.216 ↑ 1.0 1 108

Index Scan using process_service_mapping_pkey on process_service_mapping psm (cost=0.28..0.30 rows=1 width=57) (actual time=0.002..0.002 rows=1 loops=108)

  • Index Cond: (id = cd.process_service_mapping_id)
  • Filter: (active AND (process_id = 26,627) AND (edit_type = 'pes'::service_edit_type))
  • Rows Removed by Filter: 0
16. 0.183 0.183 ↑ 1.0 1 61

Index Scan using component_detail_extended_component_detail_id_index on component_detail_extended cde (cost=0.42..0.50 rows=1 width=62) (actual time=0.003..0.003 rows=1 loops=61)

  • Index Cond: (component_detail_id = cd.id)
  • Filter: active
17. 0.183 0.183 ↑ 1.0 1 61

Index Scan using enquiry_pkey on enquiry e (cost=0.43..8.39 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=61)

  • Index Cond: (id = c.enquiry_id)
  • Filter: active
18. 0.061 0.061 ↑ 1.0 1 61

Index Scan using service_pkey on service s (cost=0.14..0.28 rows=1 width=40) (actual time=0.001..0.001 rows=1 loops=61)

  • Index Cond: (id = c.service_id)
  • Filter: active
19. 0.061 0.061 ↑ 1.0 1 61

Index Scan using service_segment_pkey on service_segment ss (cost=0.14..0.24 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=61)

  • Index Cond: (id = s.service_segment)
  • Filter: active
20. 0.244 0.244 ↑ 1.0 1 61

Index Scan using eos_user_pkey on eos_user eu (cost=0.42..0.78 rows=1 width=14) (actual time=0.004..0.004 rows=1 loops=61)

  • Index Cond: (id = e.eos_user_id)
  • Filter: active
21. 0.122 0.122 ↓ 0.0 0 61

Index Scan using booking_enquiry_id_index on booking b (cost=0.28..0.30 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=61)

  • Index Cond: (enquiry_id = e.id)
  • Filter: (active AND ((status)::text = 'confirmed'::text) AND (accepted_by = 23,180))
  • Rows Removed by Filter: 0
Planning time : 3.924 ms
Execution time : 32.432 ms