explain.depesz.com

PostgreSQL's explain analyze made readable

Result: srLS : 2_3

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 0.377 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.78..860.66 rows=1 width=175) (actual time=0.254..0.377 rows=1 loops=1)

  • Join Filter: (fl.aircraft_code = ac.aircraft_code)
  • Rows Removed by Join Filter: 5
2. 0.001 0.265 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.78..837.27 rows=1 width=119) (actual time=0.143..0.265 rows=1 loops=1)

3. 0.003 0.248 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.64..828.70 rows=1 width=91) (actual time=0.126..0.248 rows=1 loops=1)

4. 0.145 0.190 ↑ 1.0 1 1

Bitmap Heap Scan on flights fl (cost=10.50..820.13 rows=1 width=63) (actual time=0.068..0.190 rows=1 loops=1)

  • Recheck Cond: (flight_no = 'PG0134'::bpchar)
  • Filter: (date(scheduled_departure) = '2017-02-15'::date)
  • Rows Removed by Filter: 395
  • Heap Blocks: exact=6
5. 0.045 0.045 ↓ 1.4 396 1

Bitmap Index Scan on flights_flight_no_scheduled_departure_key (cost=0.00..10.50 rows=277 width=0) (actual time=0.045..0.045 rows=396 loops=1)

  • Index Cond: (flight_no = 'PG0134'::bpchar)
6. 0.055 0.055 ↑ 1.0 1 1

Index Scan using airports_data_pkey on airports_data ml (cost=0.14..8.41 rows=1 width=36) (actual time=0.055..0.055 rows=1 loops=1)

  • Index Cond: (fl.departure_airport = airport_code)
7. 0.016 0.016 ↑ 1.0 1 1

Index Scan using airports_data_pkey on airports_data ml_1 (cost=0.14..8.41 rows=1 width=36) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (fl.arrival_airport = airport_code)
8. 0.006 0.006 ↑ 1.5 6 1

Seq Scan on aircrafts_data ac (cost=0.00..1.09 rows=9 width=68) (actual time=0.006..0.006 rows=6 loops=1)

9.          

SubPlan (forNested Loop Left Join)

10. 0.013 0.062 ↑ 1.0 1 1

Aggregate (cost=6.50..6.50 rows=1 width=8) (actual time=0.062..0.062 rows=1 loops=1)

11. 0.049 0.049 ↑ 1.9 53 1

Index Only Scan using t_f_fare_c_idx on ticket_flights tf_1 (cost=0.43..6.24 rows=103 width=0) (actual time=0.042..0.049 rows=53 loops=1)

  • Index Cond: (flight_id = fl.flight_id)
  • Heap Fetches: 0
12. 0.002 0.012 ↑ 1.0 1 1

Aggregate (cost=4.68..4.69 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=1)

13. 0.010 0.010 ↑ 1.0 11 1

Index Only Scan using t_f_fare_c_idx on ticket_flights tf_2 (cost=0.43..4.66 rows=11 width=0) (actual time=0.009..0.010 rows=11 loops=1)

  • Index Cond: ((flight_id = fl.flight_id) AND (fare_conditions = 'Business'::text))
  • Heap Fetches: 0
14. 0.001 0.005 ↑ 1.0 1 1

Aggregate (cost=4.48..4.49 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=1)

15. 0.004 0.004 ↓ 0.0 0 1

Index Only Scan using t_f_fare_c_idx on ticket_flights tf_3 (cost=0.43..4.47 rows=2 width=0) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((flight_id = fl.flight_id) AND (fare_conditions = 'Comfort'::text))
  • Heap Fetches: 0
16. 0.004 0.016 ↑ 1.0 1 1

Aggregate (cost=6.48..6.49 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=1)

17. 0.012 0.012 ↑ 2.2 42 1

Index Only Scan using t_f_fare_c_idx on ticket_flights tf_4 (cost=0.43..6.25 rows=91 width=0) (actual time=0.007..0.012 rows=42 loops=1)

  • Index Cond: ((flight_id = fl.flight_id) AND (fare_conditions = 'Economy'::text))
  • Heap Fetches: 0