explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XP3b : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #GEBi; plan #llfJ5; plan #0lys; plan #DIXD; plan #XqOx; plan #YKny; plan #dAVB

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.003 0.060 ↑ 2.0 1 1

GroupAggregate (cost=1.28..34.44 rows=2 width=44) (actual time=0.060..0.060 rows=1 loops=1)

  • Group Key: lineitem_product.trip_id
2. 0.003 0.057 ↑ 2.0 1 1

GroupAggregate (cost=1.28..34.38 rows=2 width=12) (actual time=0.056..0.057 rows=1 loops=1)

  • Group Key: lineitem_product.trip_id
3. 0.001 0.054 ↑ 2.0 1 1

Nested Loop (cost=1.28..34.33 rows=2 width=11) (actual time=0.016..0.054 rows=1 loops=1)

4. 0.007 0.007 ↑ 1.0 1 1

Index Only Scan using itinerary_trip_pkey on itinerary_trip (cost=0.42..8.44 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Index Cond: (id = 11)
  • Heap Fetches: 1
5. 0.001 0.046 ↑ 2.0 1 1

Nested Loop (cost=0.86..25.86 rows=2 width=11) (actual time=0.009..0.046 rows=1 loops=1)

6. 0.042 0.042 ↑ 2.0 1 1

Index Scan using lineitem_product_trip_id_40411c49 on lineitem_product (cost=0.43..8.95 rows=2 width=8) (actual time=0.005..0.042 rows=1 loops=1)

  • Index Cond: (trip_id = 11)
  • Filter: ((product_type)::text = 'Air'::text)
  • Rows Removed by Filter: 2
7. 0.003 0.003 ↑ 1.0 1 1

Index Scan using lineitem_lineitem_product_id_91160937 on lineitem_lineitem (cost=0.43..8.45 rows=1 width=11) (actual time=0.002..0.003 rows=1 loops=1)

  • Index Cond: (product_id = lineitem_product.id)
Planning time : 0.363 ms
Execution time : 0.100 ms