explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c385

Settings
# exclusive inclusive rows x rows loops node
1. 0.376 53.035 ↓ 0.0 0 1

Delete on client (cost=13.51..99.77 rows=25 width=34) (actual time=53.035..53.035 rows=0 loops=1)

2. 0.019 52.659 ↑ 1.0 25 1

Nested Loop (cost=13.51..99.77 rows=25 width=34) (actual time=52.496..52.659 rows=25 loops=1)

3. 0.031 52.490 ↑ 1.0 25 1

HashAggregate (cost=13.08..13.33 rows=25 width=32) (actual time=52.483..52.490 rows=25 loops=1)

  • Group Key: "ANY_subquery".id
4. 0.039 52.459 ↑ 1.0 25 1

Subquery Scan on ANY_subquery (cost=0.43..13.02 rows=25 width=32) (actual time=52.310..52.459 rows=25 loops=1)

5. 0.004 52.420 ↑ 1.0 25 1

Limit (cost=0.43..12.77 rows=25 width=4) (actual time=52.286..52.420 rows=25 loops=1)

6. 0.953 52.416 ↑ 42,750.2 25 1

Nested Loop (cost=0.43..527,663.99 rows=1,068,754 width=4) (actual time=52.285..52.416 rows=25 loops=1)

7. 20.572 20.572 ↑ 103.8 10,297 1

Seq Scan on client c (cost=0.00..33,301.54 rows=1,068,754 width=4) (actual time=0.006..20.572 rows=10,297 loops=1)

8. 30.891 30.891 ↓ 0.0 0 10,297

Index Only Scan using tmpidx1 on tmp_client_ids t (cost=0.43..0.45 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=10,297)

  • Index Cond: (cid = c.id)
  • Heap Fetches: 25
9. 0.150 0.150 ↑ 1.0 1 25

Index Scan using clientpk on client (cost=0.43..3.45 rows=1 width=10) (actual time=0.005..0.006 rows=1 loops=25)

  • Index Cond: (id = "ANY_subquery".id)
Planning time : 5.848 ms
Execution time : 413.193 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint client_external_service_client_id_fkey 1.589 ms 25 0.064 ms
for constraint client_external_client_lookup_client_id_fkey 1.397 ms 25 0.056 ms
for constraint vehicle_base_rate_client_id_fkey 1.408 ms 25 0.056 ms
for constraint quote_billing_client_id_fkey 1.418 ms 25 0.057 ms
for constraint order_group_client_id_fkey 0.923 ms 25 0.037 ms
for constraint customer_exclusions_client_id_fkey 1.616 ms 25 0.065 ms
for constraint client_id_fk 1.399 ms 25 0.056 ms
for constraint adp_customer_client_id_fkey 4.001 ms 25 0.160 ms
for constraint adp_customer_parent_id_fkey 1.568 ms 25 0.063 ms
for constraint adpcust_dlr_fk 3.509 ms 25 0.140 ms
for constraint adporder_dlr_fk 3.721 ms 25 0.149 ms
for constraint agent_drop_point_id_fkey 1.557 ms 25 0.062 ms
for constraint cdmcustfktwo 15.160 ms 25 0.606 ms
for constraint cdmdlrfktwo 3.282 ms 25 0.131 ms
for constraint client_idfk 32.151 ms 25 1.286 ms
for constraint client_idfk 127.323 ms 25 5.093 ms
for constraint client_idfk 1.842 ms 25 0.074 ms
for constraint client_parent_billing_client_id_fkey 1.563 ms 25 0.063 ms
for constraint clientwarehousefk 1.511 ms 25 0.060 ms
for constraint clobmobifk 1.630 ms 25 0.065 ms
for constraint clsmsifk 1.619 ms 25 0.065 ms
for constraint custcodecustfk 1.575 ms 25 0.063 ms
for constraint customer_list_dealer_id_fkey 1.740 ms 25 0.070 ms
for constraint customer_list_source_dealer_id_fkey 1.656 ms 25 0.066 ms
for constraint ddp_dlr_fk 3.454 ms 25 0.138 ms
for constraint dealer_performance_dealer_id_fkey 7.413 ms 25 0.297 ms
for constraint delivery_order_billing_client_id_fkey 6.491 ms 25 0.260 ms
for constraint dispdealerfk 1.804 ms 25 0.072 ms
for constraint dlrhistdlrfk 1.607 ms 25 0.064 ms
for constraint dlrhistwhfk 1.470 ms 25 0.059 ms
for constraint doorderedbyfk 5.524 ms 25 0.221 ms
for constraint driver_dealer_change_new_dealer_id_fkey 1.828 ms 25 0.073 ms
for constraint driver_dealer_change_old_dealer_id_fkey 1.677 ms 25 0.067 ms
for constraint driver_position_client_id_fkey 7.702 ms 25 0.308 ms
for constraint driverdealerfk 4.545 ms 25 0.182 ms
for constraint fk_client_from_adp_feed 1.547 ms 25 0.062 ms
for constraint fmpbilltoclientfk 1.691 ms 25 0.068 ms
for constraint fmplocwhfk 1.776 ms 25 0.071 ms
for constraint mergeclientfk 1.542 ms 25 0.062 ms
for constraint orderdestfk 5.548 ms 25 0.222 ms
for constraint ordersourcefk 5.520 ms 25 0.221 ms
for constraint origdestfk 1.694 ms 25 0.068 ms
for constraint origsourcefk 5.416 ms 25 0.217 ms
for constraint recurring_routes_alternate_endpoint_id_fkey 1.539 ms 25 0.062 ms
for constraint recurring_routes_alternate_startpoint_id_fkey 1.401 ms 25 0.056 ms
for constraint scheduled_run_warehouse_id_fkey 1.517 ms 25 0.061 ms
for constraint scheduled_run_warehouse_id_fkey1 1.383 ms 25 0.055 ms
for constraint scheduled_run_warehouse_id_fkey2 1.367 ms 25 0.055 ms
for constraint shiptoclientfk 1.364 ms 25 0.055 ms
for constraint signerclientfk 1.519 ms 25 0.061 ms
for constraint sr_client_map_client_id_fkey 1.594 ms 25 0.064 ms
for constraint transfer_history_from_client_id_fkey 3.616 ms 25 0.145 ms
for constraint transfer_history_to_client_id_fkey 4.540 ms 25 0.182 ms
for constraint vehicle_dispatch_map_dealer_id_fkey 1.740 ms 25 0.070 ms
for constraint vehicle_location_fk 3.546 ms 25 0.142 ms
for constraint vendor_client_id_fkey 1.518 ms 25 0.061 ms
for constraint warehousefk 1.589 ms 25 0.064 ms
for constraint zone_dispatch_fk 1.731 ms 25 0.069 ms
for constraint client_idfk 1.623 ms 25 0.065 ms
for constraint client_idfk 1.413 ms 25 0.057 ms
for constraint client_idfk 1.413 ms 25 0.057 ms
for constraint client_idfk 1.400 ms 25 0.056 ms
for constraint transfer_location_setting_local_client_id_fkey 1.386 ms 25 0.055 ms
for constraint sms_text_log_location_id_fkey 1.383 ms 25 0.055 ms
for constraint client_email_template_map_client_id_fkey 1.038 ms 25 0.042 ms
for constraint fk_pickup_source_id_map_to_source 1.642 ms 25 0.066 ms
for constraint driver_default_start_client_id_fkey 3.553 ms 25 0.142 ms
for constraint driver_default_end_client_id_fkey 3.600 ms 25 0.144 ms
for constraint customer_list_default_start_client_id_fkey 1.746 ms 25 0.070 ms
for constraint customer_list_default_end_client_id_fkey 1.653 ms 25 0.066 ms
for constraint scorev2_route_performance_by_dealer_summary_dealer_id_fkey 3.061 ms 25 0.122 ms
for constraint scorev2_driver_dealer_performance_dealer_id_fkey 3.665 ms 25 0.147 ms
for constraint scorev2_driver_dealer_performance_summary_dealer_id_fkey 3.076 ms 25 0.123 ms
for constraint driver_home_client_id_fkey 3.619 ms 25 0.145 ms
for constraint client_notification_recipient_client_id_fkey 8.515 ms 25 0.341 ms
for constraint location_id_fk 1.534 ms 25 0.061 ms