explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZHcN

Settings
# exclusive inclusive rows x rows loops node
1. 112.110 1,307.503 ↑ 35.9 12,034 1

Gather (cost=118,822.10..227,235.81 rows=431,900 width=106) (actual time=882.275..1,307.503 rows=12,034 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 294.625 1,195.393 ↑ 42.2 6,017 2 / 2

Merge Left Join (cost=117,822.10..183,045.81 rows=254,059 width=106) (actual time=914.395..1,195.393 rows=6,017 loops=2)

  • Merge Cond: (waypoint.order_id = es_order_1.id)
  • Join Filter: (waypoint.activity = 'DELIVERY'::text)
  • Rows Removed by Join Filter: 1,192
3. 23.619 647.838 ↑ 42.2 6,017 2 / 2

Merge Left Join (cost=117,821.68..123,958.72 rows=254,059 width=905) (actual time=641.823..647.838 rows=6,017 loops=2)

  • Merge Cond: (waypoint.order_id = es_order.id)
  • Join Filter: (waypoint.activity = 'LOADING'::text)
  • Rows Removed by Join Filter: 4,826
4. 3.128 18.716 ↑ 42.2 6,017 2 / 2

Sort (cost=28,408.44..29,043.59 rows=254,059 width=50) (actual time=17.399..18.716 rows=6,017 loops=2)

  • Sort Key: waypoint.order_id
  • Sort Method: quicksort Memory: 1,056kB
  • Worker 0: Sort Method: quicksort Memory: 365kB
5. 1.965 15.588 ↑ 42.2 6,017 2 / 2

Nested Loop (cost=0.42..5,600.54 rows=254,059 width=50) (actual time=0.060..15.588 rows=6,017 loops=2)

6. 0.608 8.103 ↓ 2.2 5,520 2 / 2

Parallel Append (cost=0.42..518.54 rows=2,541 width=79) (actual time=0.041..8.103 rows=5,520 loops=2)

7. 7.495 7.495 ↓ 2.2 5,520 2 / 2

Parallel Index Scan using _hyper_38_426_chunk_itinerary_stop_position_ts_idx on _hyper_38_426_chunk s (cost=0.42..505.84 rows=2,541 width=79) (actual time=0.040..7.495 rows=5,520 loops=2)

  • Index Cond: (position_ts >= '2020-10-12 00:00:00'::timestamp without time zone)
  • Filter: (leg_index IS NOT NULL)
  • Rows Removed by Filter: 3,792
8. 5.519 5.519 ↑ 100.0 1 11,039 / 2

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

9. 28.601 605.503 ↑ 1.0 167,057 2 / 2

Materialize (cost=89,413.24..90,254.66 rows=168,283 width=859) (actual time=478.157..605.503 rows=167,057 loops=2)

10. 452.843 576.902 ↑ 1.0 162,283 2 / 2

Sort (cost=89,413.24..89,833.95 rows=168,283 width=859) (actual time=478.153..576.902 rows=162,283 loops=2)

  • Sort Key: es_order.id
  • Sort Method: external merge Disk: 138,728kB
  • Worker 0: Sort Method: external merge Disk: 138,728kB
11. 124.059 124.059 ↑ 1.0 162,448 2 / 2

Seq Scan on es_order (cost=0.00..38,321.83 rows=168,283 width=859) (actual time=0.029..124.059 rows=162,448 loops=2)

12. 69.265 252.930 ↑ 1.0 163,464 2 / 2

Materialize (cost=0.42..40,453.37 rows=168,283 width=859) (actual time=0.043..252.930 rows=163,464 loops=2)

13. 183.665 183.665 ↑ 1.0 162,282 2 / 2

Index Scan using es_order_pk on es_order es_order_1 (cost=0.42..40,032.67 rows=168,283 width=859) (actual time=0.037..183.665 rows=162,282 loops=2)

Planning time : 0.590 ms
Execution time : 1,335.740 ms