explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GjCs

Settings
# exclusive inclusive rows x rows loops node
1. 0.250 390.624 ↓ 8.0 8 1

Merge Join (cost=11,123.05..615,243.05 rows=1 width=76) (actual time=390.606..390.624 rows=8 loops=1)

  • Merge Cond: (dschds.dispatch_schedule_id = ls.dispatch_schedule_id)
  • Join Filter: (ls.idx = (row_number() OVER (?)))
  • Rows Removed by Join Filter: 73
  • Functions: 27
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 3.430 ms, Inlining 7.454 ms, Optimization 222.004 ms, Emission 154.424 ms, Total 387.312 ms
2. 1.927 387.469 ↑ 1,732.5 4,022 1

WindowAgg (cost=0.43..516,958.83 rows=6,968,214 width=40) (actual time=384.488..387.469 rows=4,022 loops=1)

3. 385.542 385.542 ↑ 1,732.1 4,023 1

Index Scan using dispatch_schedule_stop_idx2 on dispatch_schedule_stop dschds (cost=0.43..395,015.08 rows=6,968,214 width=32) (actual time=384.457..385.542 rows=4,023 loops=1)

4. 0.009 2.905 ↓ 24.3 73 1

Materialize (cost=11,122.62..11,180.23 rows=3 width=60) (actual time=2.417..2.905 rows=73 loops=1)

5. 0.114 2.896 ↓ 3.0 9 1

Subquery Scan on ls (cost=11,122.62..11,180.22 rows=3 width=60) (actual time=2.415..2.896 rows=9 loops=1)

  • Filter: (ls.schedule_date = '2020-03-16'::date)
  • Rows Removed by Filter: 2115
6. 0.909 2.782 ↓ 1.4 2,124 1

WindowAgg (cost=11,122.62..11,161.02 rows=1,536 width=60) (actual time=1.788..2.782 rows=2,124 loops=1)

7. 0.576 1.873 ↓ 1.4 2,124 1

Sort (cost=11,122.62..11,126.46 rows=1,536 width=52) (actual time=1.746..1.873 rows=2,124 loops=1)

  • Sort Key: dschds_1.dispatch_schedule_id, dschds_1.depart_date_time
  • Sort Method: quicksort Memory: 395kB
8. 0.221 1.297 ↓ 1.4 2,124 1

Nested Loop (cost=0.86..11,041.33 rows=1,536 width=52) (actual time=0.084..1.297 rows=2,124 loops=1)

9. 0.132 0.132 ↓ 1.1 236 1

Index Scan using dispatch_schedule_idx1 on dispatch_schedule dschd (cost=0.42..406.15 rows=214 width=28) (actual time=0.070..0.132 rows=236 loops=1)

  • Index Cond: (schedule_id = 30112)
10. 0.944 0.944 ↑ 2.8 9 236

Index Scan using dispatch_schedule_stop_idx2 on dispatch_schedule_stop dschds_1 (cost=0.43..49.45 rows=25 width=32) (actual time=0.002..0.004 rows=9 loops=236)

  • Index Cond: (dispatch_schedule_id = dschd.dispatch_schedule_id)
Execution time : 394.188 ms