explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 38Qe

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 145.211 ↓ 0.0 0 1

Nested Loop (cost=2.27..22.74 rows=1 width=3,355) (actual time=145.211..145.211 rows=0 loops=1)

  • Output: routeentit0_.uuid, routeentit0_.id, routeentit0_.tenant, routeentit0_.driver_uuid, routeentit0_.region_uuid, routeentit0_.route_state, routeentit0_.route_type, routeentit0_.time_configuration, routeentit0_.route_freight, routeentit0_.attributes, routeentit0_.created_at, routeentit0_.updated_at, routeentit0_.driver_fleet_id, routeentit0_.driver_info, services1_.uuid, services1_.id, services1_.service_state, services1_.service_type, services1_.loaded_orders, services1_.unloaded_orders, services1_.time_configuration, services1_.created_at, services1_.updated_at, services1_.route_uuid, services1_.service_order, services1_.attributes, loadedorde2_.order_uuid, loadedorde2_.service_uuid, orderentit3_.uuid, orderentit3_.fleet_id, orderentit3_.external_id, orderentit3_.external_uuid, orderentit3_.region_uuid, orderentit3_.order_state, orderentit3_.order_type, orderentit3_.operational_type, orderentit3_.trackable_source, orderentit3_.tenant, orderentit3_.is_test, orderentit3_.parent_uuid, orderentit3_.origin, orderentit3_.destination, orderentit3_.items, orderentit3_.created_at, orderentit3_.updated_at, orderentit3_.attributes, orderentit3_.physical_origin, orderentit3_.complement_strategy, orderentit3_.origin_uuid, orderentit3_.destination_uuid
  • Inner Unique: true
2. 0.030 116.007 ↓ 16.0 16 1

Nested Loop (cost=1.71..18.30 rows=1 width=1,853) (actual time=8.836..116.007 rows=16 loops=1)

  • Output: services1_.uuid, services1_.id, services1_.service_state, services1_.service_type, services1_.loaded_orders, services1_.unloaded_orders, services1_.time_configuration, services1_.created_at, services1_.updated_at, services1_.route_uuid, services1_.service_order, services1_.attributes, loadedorde2_.order_uuid, loadedorde2_.service_uuid, orderentit3_.uuid, orderentit3_.fleet_id, orderentit3_.external_id, orderentit3_.external_uuid, orderentit3_.region_uuid, orderentit3_.order_state, orderentit3_.order_type, orderentit3_.operational_type, orderentit3_.trackable_source, orderentit3_.tenant, orderentit3_.is_test, orderentit3_.parent_uuid, orderentit3_.origin, orderentit3_.destination, orderentit3_.items, orderentit3_.created_at, orderentit3_.updated_at, orderentit3_.attributes, orderentit3_.physical_origin, orderentit3_.complement_strategy, orderentit3_.origin_uuid, orderentit3_.destination_uuid
  • Inner Unique: true
3. 0.014 43.401 ↓ 16.0 16 1

Nested Loop (cost=1.14..13.86 rows=1 width=1,630) (actual time=3.852..43.401 rows=16 loops=1)

  • Output: loadedorde2_.order_uuid, loadedorde2_.service_uuid, orderentit3_.uuid, orderentit3_.fleet_id, orderentit3_.external_id, orderentit3_.external_uuid, orderentit3_.region_uuid, orderentit3_.order_state, orderentit3_.order_type, orderentit3_.operational_type, orderentit3_.trackable_source, orderentit3_.tenant, orderentit3_.is_test, orderentit3_.parent_uuid, orderentit3_.origin, orderentit3_.destination, orderentit3_.items, orderentit3_.created_at, orderentit3_.updated_at, orderentit3_.attributes, orderentit3_.physical_origin, orderentit3_.complement_strategy, orderentit3_.origin_uuid, orderentit3_.destination_uuid
4. 31.366 31.366 ↑ 1.0 1 1

Index Scan using unique_order on ifood_fleet_delivery_manager.order_delivery orderentit3_ (cost=0.57..4.67 rows=1 width=1,598) (actual time=1.662..31.366 rows=1 loops=1)

  • Output: orderentit3_.uuid, orderentit3_.fleet_id, orderentit3_.external_id, orderentit3_.external_uuid, orderentit3_.region_uuid, orderentit3_.order_state, orderentit3_.order_type, orderentit3_.operational_type, orderentit3_.trackable_source, orderentit3_.tenant, orderentit3_.is_test, orderentit3_.parent_uuid, orderentit3_.origin, orderentit3_.destination, orderentit3_.items, orderentit3_.created_at, orderentit3_.updated_at, orderentit3_.attributes, orderentit3_.physical_origin, orderentit3_.complement_strategy, orderentit3_.origin_uuid, orderentit3_.destination_uuid
  • Index Cond: (orderentit3_.fleet_id = '205536976'::bigint)
5. 12.021 12.021 ↓ 5.3 16 1

Index Scan using idx_loaded_order_order_uuid on ifood_fleet_delivery_manager.loaded_order loadedorde2_ (cost=0.57..8.89 rows=3 width=32) (actual time=2.186..12.021 rows=16 loops=1)

  • Output: loadedorde2_.order_uuid, loadedorde2_.service_uuid
  • Index Cond: (loadedorde2_.order_uuid = orderentit3_.uuid)
6. 72.576 72.576 ↑ 1.0 1 16

Index Scan using service_pkey on ifood_fleet_delivery_manager.service services1_ (cost=0.57..4.44 rows=1 width=223) (actual time=4.536..4.536 rows=1 loops=16)

  • Output: services1_.uuid, services1_.id, services1_.service_state, services1_.service_type, services1_.loaded_orders, services1_.unloaded_orders, services1_.time_configuration, services1_.created_at, services1_.updated_at, services1_.route_uuid, services1_.service_order, services1_.attributes
  • Index Cond: (services1_.uuid = loadedorde2_.service_uuid)
7. 29.184 29.184 ↓ 0.0 0 16

Index Scan using route_pkey on ifood_fleet_delivery_manager.route routeentit0_ (cost=0.56..4.44 rows=1 width=1,502) (actual time=1.824..1.824 rows=0 loops=16)

  • Output: routeentit0_.uuid, routeentit0_.id, routeentit0_.tenant, routeentit0_.driver_uuid, routeentit0_.region_uuid, routeentit0_.route_state, routeentit0_.route_type, routeentit0_.time_configuration, routeentit0_.route_freight, routeentit0_.attributes, routeentit0_.created_at, routeentit0_.updated_at, routeentit0_.driver_fleet_id, routeentit0_.driver_info
  • Index Cond: (routeentit0_.uuid = services1_.route_uuid)
  • Filter: (((routeentit0_.tenant)::text = 'br'::text) AND ((routeentit0_.route_state)::text = ANY ('{IN_SERVICE,PENDING_OFFER,OFFERED,ACCEPTED,ON_THE_WAY}'::text[])))
  • Rows Removed by Filter: 1
Planning time : 3.535 ms
Execution time : 145.309 ms