explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AZOI : Optimization for: plan #mkoJ

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.168 16.845 ↑ 1.0 1,000 1

Limit (cost=1.42..5,639.16 rows=1,000 width=4) (actual time=9.771..16.845 rows=1,000 loops=1)

2. 0.488 16.677 ↑ 6,232.3 1,000 1

Merge Join (cost=1.42..35,136,103.41 rows=6,232,303 width=4) (actual time=9.771..16.677 rows=1,000 loops=1)

  • Merge Cond: (dp.id = df.packet_id)
3. 7.406 12.855 ↑ 1,387.1 103 1

Nested Loop (cost=0.99..4,261,602.76 rows=142,876 width=4) (actual time=0.247..12.855 rows=103 loops=1)

  • Join Filter: (r.session_id = s.id)
  • Rows Removed by Join Filter: 40267
4. 0.037 1.020 ↑ 2,115.7 103 1

Nested Loop (cost=0.99..2,966,875.54 rows=217,922 width=8) (actual time=0.111..1.020 rows=103 loops=1)

5. 0.132 0.571 ↑ 2,115.7 103 1

Nested Loop (cost=0.71..1,524,695.40 rows=217,922 width=8) (actual time=0.074..0.571 rows=103 loops=1)

6. 0.130 0.130 ↑ 2,115.7 103 1

Index Scan using builds_datapacket_pkey on builds_datapacket dp (cost=0.42..32,718.78 rows=217,922 width=8) (actual time=0.064..0.130 rows=103 loops=1)

7. 0.309 0.309 ↑ 1.0 1 103

Index Scan using builds_datafile_pkey on builds_datafile dff (cost=0.29..6.84 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=103)

  • Index Cond: (id = dp.file_id)
8. 0.412 0.412 ↑ 1.0 1 103

Index Scan using flights_run_pkey on flights_run r (cost=0.28..6.61 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=103)

  • Index Cond: (id = dff.run_id)
9. 3.892 4.429 ↑ 1.0 392 103

Materialize (cost=0.00..271.53 rows=396 width=4) (actual time=0.000..0.043 rows=392 loops=103)

10. 0.537 0.537 ↑ 1.0 395 1

Seq Scan on flights_session s (cost=0.00..269.55 rows=396 width=4) (actual time=0.007..0.537 rows=395 loops=1)

  • Filter: (start_time < '2019-01-01 00:00:00-08'::timestamp with time zone)
  • Rows Removed by Filter: 209
11. 3.334 3.334 ↑ 9,505.8 1,000 1

Index Scan using builds_datafield_packet_id_idx on builds_datafield df (cost=0.43..30,856,634.50 rows=9,505,836 width=8) (actual time=1.459..3.334 rows=1,000 loops=1)

Planning time : 3.672 ms
Execution time : 17.025 ms