explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2s3Y

Settings
# exclusive inclusive rows x rows loops node
1. 0.076 0.448 ↑ 1.0 1 1

GroupAggregate (cost=156.07..17,673.54 rows=1 width=36) (actual time=0.446..0.448 rows=1 loops=1)

  • Group Key: wo_i.id
2. 0.032 0.372 ↓ 1.2 6 1

Nested Loop (cost=156.07..17,673.50 rows=5 width=520) (actual time=0.193..0.372 rows=6 loops=1)

3. 0.047 0.047 ↑ 1.0 1 1

Index Only Scan using work_orders_pkey on work_orders wo_i (cost=0.29..8.31 rows=1 width=4) (actual time=0.043..0.047 rows=1 loops=1)

  • Index Cond: (id = 32,910)
  • Heap Fetches: 1
4. 0.037 0.293 ↓ 1.2 6 1

Nested Loop (cost=155.78..17,665.15 rows=5 width=520) (actual time=0.136..0.293 rows=6 loops=1)

5. 0.041 0.208 ↓ 1.2 6 1

Nested Loop (cost=155.49..17,625.27 rows=5 width=8) (actual time=0.105..0.208 rows=6 loops=1)

6. 0.047 0.089 ↑ 6.0 6 1

Bitmap Heap Scan on sample_parameters sp (cost=155.07..16,950.93 rows=36 width=12) (actual time=0.070..0.089 rows=6 loops=1)

  • Recheck Cond: (work_order_id = 32,910)
  • Filter: ((state)::text = 'validated'::text)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=4
7. 0.042 0.042 ↑ 303.5 24 1

Bitmap Index Scan on index_sample_parameters_work_order_id (cost=0.00..155.06 rows=7,284 width=0) (actual time=0.040..0.042 rows=24 loops=1)

  • Index Cond: (work_order_id = 32,910)
8. 0.078 0.078 ↑ 3.0 1 6

Index Scan using index_analytical_results_sample_parameter_id on analytical_results results (cost=0.42..18.70 rows=3 width=4) (actual time=0.010..0.013 rows=1 loops=6)

  • Index Cond: (sample_parameter_id = sp.id)
  • Filter: (value_id IS NOT NULL)
9. 0.048 0.048 ↑ 1.0 1 6

Index Scan using samples_pkey on samples s (cost=0.29..7.97 rows=1 width=520) (actual time=0.008..0.008 rows=1 loops=6)

  • Index Cond: (id = sp.sample_id)
Planning time : 1.626 ms
Execution time : 0.770 ms