explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n8gt

Settings
# exclusive inclusive rows x rows loops node
1. 36.775 9,159.717 ↑ 307.6 11,778 1

Merge Join (cost=188,827.44..255,822.44 rows=3,622,552 width=138) (actual time=9,151.380..9,159.717 rows=11,778 loops=1)

  • Merge Cond: ((l.id = waypoint.order_id) AND (('LOADING'::text) = waypoint.activity))
2. 331.715 9,082.954 ↑ 1.0 324,564 1

Sort (cost=130,948.06..131,789.34 rows=336,512 width=124) (actual time=9,027.675..9,082.954 rows=324,564 loops=1)

  • Sort Key: l.id, ('LOADING'::text)
  • Sort Method: external merge Disk: 16,824kB
3. 37.314 8,751.239 ↑ 1.0 324,876 1

Append (cost=0.00..87,567.76 rows=336,512 width=124) (actual time=0.079..8,751.239 rows=324,876 loops=1)

4. 4,439.874 4,439.874 ↑ 1.0 162,438 1

Seq Scan on es_order l (cost=0.00..42,942.60 rows=168,256 width=124) (actual time=0.078..4,439.874 rows=162,438 loops=1)

5. 4,274.051 4,274.051 ↑ 1.0 162,438 1

Seq Scan on es_order l_1 (cost=0.00..42,942.60 rows=168,256 width=124) (actual time=0.047..4,274.051 rows=162,438 loops=1)

6. 2.148 39.988 ↑ 36.6 11,778 1

Materialize (cost=57,879.37..60,032.37 rows=430,600 width=50) (actual time=36.087..39.988 rows=11,778 loops=1)

7. 7.140 37.840 ↑ 36.6 11,778 1

Sort (cost=57,879.37..58,955.87 rows=430,600 width=50) (actual time=36.083..37.840 rows=11,778 loops=1)

  • Sort Key: waypoint.order_id, waypoint.activity
  • Sort Method: quicksort Memory: 1,305kB
8. 3.993 30.700 ↑ 36.6 11,778 1

Nested Loop (cost=0.42..9,171.85 rows=430,600 width=50) (actual time=0.069..30.700 rows=11,778 loops=1)

9. 1.184 15.910 ↓ 2.5 10,797 1

Append (cost=0.42..559.85 rows=4,306 width=79) (actual time=0.054..15.910 rows=10,797 loops=1)

10. 14.726 14.726 ↓ 2.5 10,797 1

Index Scan using _hyper_38_426_chunk_itinerary_stop_position_ts_idx on _hyper_38_426_chunk s (cost=0.42..538.32 rows=4,306 width=79) (actual time=0.053..14.726 rows=10,797 loops=1)

  • Index Cond: (position_ts >= '2020-10-12 00:00:00'::timestamp without time zone)
  • Filter: (leg_index IS NOT NULL)
  • Rows Removed by Filter: 7,404
11. 10.797 10.797 ↑ 100.0 1 10,797

Function Scan on unnest waypoint (cost=0.00..1.00 rows=100 width=36) (actual time=0.001..0.001 rows=1 loops=10,797)

Planning time : 0.566 ms
Execution time : 9,165.363 ms