explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3fVF

Settings
# exclusive inclusive rows x rows loops node
1. 0.171 10.235 ↓ 0.0 0 1

Delete on client (cost=4.89..39.14 rows=10 width=34) (actual time=10.235..10.235 rows=0 loops=1)

2. 0.008 10.064 ↑ 1.0 10 1

Nested Loop (cost=4.89..39.14 rows=10 width=34) (actual time=10.006..10.064 rows=10 loops=1)

3. 0.017 9.996 ↑ 1.0 10 1

HashAggregate (cost=4.46..4.56 rows=10 width=32) (actual time=9.993..9.996 rows=10 loops=1)

  • Group Key: "ANY_subquery".id
4. 0.032 9.979 ↑ 1.0 10 1

Subquery Scan on ANY_subquery (cost=3.67..4.44 rows=10 width=32) (actual time=9.957..9.979 rows=10 loops=1)

5. 0.003 9.947 ↑ 1.0 10 1

Limit (cost=3.67..4.34 rows=10 width=4) (actual time=9.926..9.947 rows=10 loops=1)

6. 1.408 9.944 ↑ 131,323.8 10 1

Merge Join (cost=3.67..87,417.70 rows=1,313,238 width=4) (actual time=9.924..9.944 rows=10 loops=1)

  • Merge Cond: (c.id = t.cid)
7. 4.051 4.051 ↑ 661.6 2,001 1

Index Only Scan using clientpk on client c (cost=0.43..36,767.70 rows=1,323,824 width=4) (actual time=0.018..4.051 rows=2,001 loops=1)

  • Heap Fetches: 11,249
8. 4.485 4.485 ↑ 132.5 9,913 1

Index Only Scan using tmpidx1 on tmp_client_ids t (cost=0.43..30,925.63 rows=1,313,238 width=4) (actual time=0.197..4.485 rows=9,913 loops=1)

  • Heap Fetches: 9,913
9. 0.060 0.060 ↑ 1.0 1 10

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

  • Index Cond: (id = "ANY_subquery".id)
Planning time : 6.250 ms
Execution time : 503.368 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint client_external_service_client_id_fkey 0.700 ms 10 0.070 ms
for constraint client_external_client_lookup_client_id_fkey 0.811 ms 10 0.081 ms
for constraint vehicle_base_rate_client_id_fkey 0.621 ms 10 0.062 ms
for constraint quote_billing_client_id_fkey 0.635 ms 10 0.064 ms
for constraint order_group_client_id_fkey 0.404 ms 10 0.040 ms
for constraint customer_exclusions_client_id_fkey 0.793 ms 10 0.079 ms
for constraint client_id_fk 0.622 ms 10 0.062 ms
for constraint adp_customer_client_id_fkey 1.800 ms 10 0.180 ms
for constraint adp_customer_parent_id_fkey 0.683 ms 10 0.068 ms
for constraint adpcust_dlr_fk 1.607 ms 10 0.161 ms
for constraint adporder_dlr_fk 1.767 ms 10 0.177 ms
for constraint agent_drop_point_id_fkey 0.662 ms 10 0.066 ms
for constraint cdmcustfktwo 6.913 ms 10 0.691 ms
for constraint cdmdlrfktwo 1.365 ms 10 0.137 ms
for constraint client_idfk 13.414 ms 10 1.341 ms
for constraint client_idfk 53.172 ms 10 5.317 ms
for constraint client_idfk 0.893 ms 10 0.089 ms
for constraint client_parent_billing_client_id_fkey 0.827 ms 10 0.083 ms
for constraint clientwarehousefk 2.690 ms 10 0.269 ms
for constraint clobmobifk 0.806 ms 10 0.081 ms
for constraint clsmsifk 0.844 ms 10 0.084 ms
for constraint custcodecustfk 0.721 ms 10 0.072 ms
for constraint customer_list_dealer_id_fkey 0.765 ms 10 0.076 ms
for constraint customer_list_source_dealer_id_fkey 0.720 ms 10 0.072 ms
for constraint ddp_dlr_fk 1.353 ms 10 0.135 ms
for constraint dealer_performance_dealer_id_fkey 3.252 ms 10 0.325 ms
for constraint delivery_order_billing_client_id_fkey 2.983 ms 10 0.298 ms
for constraint dispdealerfk 0.815 ms 10 0.081 ms
for constraint dlrhistdlrfk 0.784 ms 10 0.078 ms
for constraint dlrhistwhfk 0.654 ms 10 0.065 ms
for constraint doorderedbyfk 2.715 ms 10 0.271 ms
for constraint driver_dealer_change_new_dealer_id_fkey 0.802 ms 10 0.080 ms
for constraint driver_dealer_change_old_dealer_id_fkey 0.726 ms 10 0.073 ms
for constraint driver_position_client_id_fkey 3.148 ms 10 0.315 ms
for constraint driverdealerfk 1.953 ms 10 0.195 ms
for constraint fk_client_from_adp_feed 0.684 ms 10 0.068 ms
for constraint fmpbilltoclientfk 0.755 ms 10 0.075 ms
for constraint fmplocwhfk 0.804 ms 10 0.080 ms
for constraint mergeclientfk 0.710 ms 10 0.071 ms
for constraint orderdestfk 2.335 ms 10 0.233 ms
for constraint ordersourcefk 2.318 ms 10 0.232 ms
for constraint origdestfk 0.735 ms 10 0.073 ms
for constraint origsourcefk 2.244 ms 10 0.224 ms
for constraint recurring_routes_alternate_endpoint_id_fkey 0.706 ms 10 0.071 ms
for constraint recurring_routes_alternate_startpoint_id_fkey 0.617 ms 10 0.062 ms
for constraint scheduled_run_warehouse_id_fkey 0.690 ms 10 0.069 ms
for constraint scheduled_run_warehouse_id_fkey1 0.615 ms 10 0.061 ms
for constraint scheduled_run_warehouse_id_fkey2 0.618 ms 10 0.062 ms
for constraint shiptoclientfk 0.631 ms 10 0.063 ms
for constraint signerclientfk 0.718 ms 10 0.072 ms
for constraint sr_client_map_client_id_fkey 0.723 ms 10 0.072 ms
for constraint transfer_history_from_client_id_fkey 157.332 ms 10 15.733 ms
for constraint transfer_history_to_client_id_fkey 162.234 ms 10 16.223 ms
for constraint vehicle_dispatch_map_dealer_id_fkey 1.026 ms 10 0.103 ms
for constraint vehicle_location_fk 1.523 ms 10 0.152 ms
for constraint vendor_client_id_fkey 0.771 ms 10 0.077 ms
for constraint warehousefk 0.731 ms 10 0.073 ms
for constraint zone_dispatch_fk 0.786 ms 10 0.079 ms
for constraint client_idfk 0.745 ms 10 0.074 ms
for constraint client_idfk 0.667 ms 10 0.067 ms
for constraint client_idfk 0.653 ms 10 0.065 ms
for constraint client_idfk 0.647 ms 10 0.065 ms
for constraint transfer_location_setting_local_client_id_fkey 0.653 ms 10 0.065 ms
for constraint sms_text_log_location_id_fkey 0.669 ms 10 0.067 ms
for constraint client_email_template_map_client_id_fkey 0.559 ms 10 0.056 ms
for constraint fk_pickup_source_id_map_to_source 0.812 ms 10 0.081 ms
for constraint driver_default_start_client_id_fkey 1.809 ms 10 0.181 ms
for constraint driver_default_end_client_id_fkey 1.456 ms 10 0.146 ms
for constraint customer_list_default_start_client_id_fkey 0.761 ms 10 0.076 ms
for constraint customer_list_default_end_client_id_fkey 0.728 ms 10 0.073 ms
for constraint scorev2_route_performance_by_dealer_summary_dealer_id_fkey 1.351 ms 10 0.135 ms
for constraint scorev2_driver_dealer_performance_dealer_id_fkey 19.896 ms 10 1.990 ms
for constraint scorev2_driver_dealer_performance_summary_dealer_id_fkey 1.417 ms 10 0.142 ms
for constraint driver_home_client_id_fkey 1.554 ms 10 0.155 ms
for constraint client_notification_recipient_client_id_fkey 3.497 ms 10 0.350 ms
for constraint location_id_fk 0.705 ms 10 0.070 ms