explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RKY0

Settings
# exclusive inclusive rows x rows loops node
1. 494.311 1,348.507 ↓ 1.4 100,752 1

Sort (cost=705,537.33..705,711.05 rows=69,487 width=1,377) (actual time=1,260.169..1,348.507 rows=100,752 loops=1)

  • Output: route_machine.created_at, route_machine.id, route_machine.help_id, route_machine.route_id, route_machine.machine_id, route_machine.external_machine_id, route_machine.machine_status, route_machine.machine_details, route_machine.served_at, route_machine.served_by_id, route_machine.expiry_date_after_refill, route_machine.description, route_machine.removed, route_machine.removed_by_id, route_machine.removed_by_fullname, route_machine.packed_in_warehouse, route_machine.origin_date, route_machine.moved_reason, route.start_at
  • Sort Key: route.start_at
  • Sort Method: external sort Disk: 133408kB
  • Buffers: shared hit=2249482, temp read=16676 written=16676
2. 0.000 854.196 ↓ 1.4 100,752 1

Gather (cost=1,001.57..664,117.03 rows=69,487 width=1,377) (actual time=0.571..854.196 rows=100,752 loops=1)

  • Output: route_machine.created_at, route_machine.id, route_machine.help_id, route_machine.route_id, route_machine.machine_id, route_machine.external_machine_id, route_machine.machine_status, route_machine.machine_details, route_machine.served_at, route_machine.served_by_id, route_machine.expiry_date_after_refill, route_machine.description, route_machine.removed, route_machine.removed_by_id, route_machine.removed_by_fullname, route_machine.packed_in_warehouse, route_machine.origin_date, route_machine.moved_reason, route.start_at
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=2249482
3. 32.358 1,021.184 ↓ 1.2 33,584 3

Hash Join (cost=1.57..656,168.33 rows=28,953 width=1,377) (actual time=0.678..1,021.184 rows=33,584 loops=3)

  • Output: route_machine.created_at, route_machine.id, route_machine.help_id, route_machine.route_id, route_machine.machine_id, route_machine.external_machine_id, route_machine.machine_status, route_machine.machine_details, route_machine.served_at, route_machine.served_by_id, route_machine.expiry_date_after_refill, route_machine.description, route_machine.removed, route_machine.removed_by_id, route_machine.removed_by_fullname, route_machine.packed_in_warehouse, route_machine.origin_date, route_machine.moved_reason, route.start_at
  • Hash Cond: (route.route_status_id = route_status.id)
  • Buffers: shared hit=2249482
  • Worker 0: actual time=0.842..1154.263 rows=39383 loops=1
  • Buffers: shared hit=817524
  • Worker 1: actual time=1.134..1153.974 rows=38809 loops=1
  • Buffers: shared hit=829308
4. 733.070 988.774 ↑ 1.3 33,584 3

Nested Loop (cost=0.42..655,714.79 rows=43,430 width=1,393) (actual time=0.439..988.774 rows=33,584 loops=3)

  • Output: route_machine.created_at, route_machine.id, route_machine.help_id, route_machine.route_id, route_machine.machine_id, route_machine.external_machine_id, route_machine.machine_status, route_machine.machine_details, route_machine.served_at, route_machine.served_by_id, route_machine.expiry_date_after_refill, route_machine.description, route_machine.removed, route_machine.removed_by_id, route_machine.removed_by_fullname, route_machine.packed_in_warehouse, route_machine.origin_date, route_machine.moved_reason, route.start_at, route.route_status_id
  • Buffers: shared hit=2249391
  • Worker 0: actual time=0.483..1116.606 rows=39383 loops=1
  • Buffers: shared hit=817479
  • Worker 1: actual time=0.795..1116.431 rows=38809 loops=1
  • Buffers: shared hit=829263
5. 255.701 255.701 ↑ 1.3 177,569 3

Parallel Seq Scan on public.route_machine (cost=0.00..105,346.30 rows=222,935 width=1,369) (actual time=0.016..255.701 rows=177,569 loops=3)

  • Output: route_machine.created_at, route_machine.id, route_machine.route_id, route_machine.machine_id, route_machine.external_machine_id, route_machine.machine_status, route_machine.served_at, route_machine.served_by_id, route_machine.description, route_machine.removed, route_machine.machine_details, route_machine.expiry_date_after_refill, route_machine.help_id, route_machine.removed_by_fullname, route_machine.removed_by_id, route_machine.packed_in_warehouse, route_machine.moved_reason, route_machine.origin_date
  • Filter: (NOT route_machine.removed)
  • Rows Removed by Filter: 1365
  • Buffers: shared hit=103101
  • Worker 0: actual time=0.020..300.373 rows=193670 loops=1
  • Buffers: shared hit=37672
  • Worker 1: actual time=0.024..299.988 rows=196484 loops=1
  • Buffers: shared hit=37846
6. 0.003 0.003 ↓ 0.0 0 532,706

Index Scan using route_pkey on public.route (cost=0.42..2.46 rows=1 width=40) (actual time=0.003..0.003 rows=0 loops=532,706)

  • Output: route.created_at, route.updated_at, route.created_by, route.updated_by, route.id, route.name, route.company_id, route.route_status_id, route.route_type_id, route.start_at, route.end_at, route.start_filler_time, route.end_filler_time, route.filler_id, route.predict_route, route.deleted, route.deleted_at, route.deleted_by, route.elastic_id, route.created_by_fullname, route.deleted_by_fullname, route.help_id, route.end_location, route.start_location, route.last_refresh_stock, route.route_status_change_at, route.estimated_route_time_minutes, route.end_filler_time_manual, route.updated_by_fullname, route.get_pickup, route.estimated_route_drive_time_minutes, route.estimated_route_service_time_minutes, route.filtered_categories
  • Index Cond: (route.id = route_machine.route_id)
  • Filter: ((NOT route.deleted) AND (route.end_filler_time IS NULL))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=2146290
  • Worker 0: actual time=0.003..0.003 rows=0 loops=193670
  • Buffers: shared hit=779807
  • Worker 1: actual time=0.003..0.003 rows=0 loops=196484
  • Buffers: shared hit=791417
7. 0.007 0.052 ↓ 1.5 6 3

Hash (cost=1.09..1.09 rows=4 width=16) (actual time=0.052..0.052 rows=6 loops=3)

  • Output: route_status.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=9
  • Worker 0: actual time=0.063..0.063 rows=6 loops=1
  • Buffers: shared hit=4
  • Worker 1: actual time=0.081..0.081 rows=6 loops=1
  • Buffers: shared hit=4
8. 0.045 0.045 ↓ 1.5 6 3

Seq Scan on public.route_status (cost=0.00..1.09 rows=4 width=16) (actual time=0.041..0.045 rows=6 loops=3)

  • Output: route_status.id
  • Filter: (((route_status.name)::text <> 'asd'::text) AND ((route_status.name)::text <> 'asd'::text))
  • Buffers: shared hit=9
  • Worker 0: actual time=0.052..0.053 rows=6 loops=1
  • Buffers: shared hit=4
  • Worker 1: actual time=0.067..0.072 rows=6 loops=1
  • Buffers: shared hit=4