explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n7Fk

Settings
# exclusive inclusive rows x rows loops node
1. 0.175 7.976 ↓ 0.0 0 1

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

2. 0.023 7.801 ↑ 1.0 10 1

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

3. 0.025 7.708 ↑ 1.0 10 1

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

  • Group Key: "ANY_subquery".id
4. 0.055 7.683 ↑ 1.0 10 1

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

5. 0.002 7.628 ↑ 1.0 10 1

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

6. 1.352 7.626 ↑ 131,323.8 10 1

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

  • Merge Cond: (c.id = t.cid)
7. 2.432 2.432 ↑ 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.015..2.432 rows=2,001 loops=1)

  • Heap Fetches: 1,345
8. 3.842 3.842 ↑ 132.2 9,933 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.146..3.842 rows=9,933 loops=1)

  • Heap Fetches: 9,933
9. 0.070 0.070 ↑ 1.0 1 10

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

  • Index Cond: (id = "ANY_subquery".id)
Planning time : 0.740 ms
Execution time : 173.247 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint client_external_service_client_id_fkey 0.717 ms 10 0.072 ms
for constraint client_external_client_lookup_client_id_fkey 0.582 ms 10 0.058 ms
for constraint vehicle_base_rate_client_id_fkey 0.567 ms 10 0.057 ms
for constraint quote_billing_client_id_fkey 0.738 ms 10 0.074 ms
for constraint order_group_client_id_fkey 0.407 ms 10 0.041 ms
for constraint customer_exclusions_client_id_fkey 0.667 ms 10 0.067 ms
for constraint client_id_fk 0.569 ms 10 0.057 ms
for constraint adp_customer_client_id_fkey 1.666 ms 10 0.167 ms
for constraint adp_customer_parent_id_fkey 0.644 ms 10 0.064 ms
for constraint adpcust_dlr_fk 1.509 ms 10 0.151 ms
for constraint adporder_dlr_fk 1.796 ms 10 0.180 ms
for constraint agent_drop_point_id_fkey 0.620 ms 10 0.062 ms
for constraint cdmcustfktwo 6.072 ms 10 0.607 ms
for constraint cdmdlrfktwo 1.465 ms 10 0.147 ms
for constraint client_idfk 12.900 ms 10 1.290 ms
for constraint client_idfk 51.823 ms 10 5.182 ms
for constraint client_idfk 0.852 ms 10 0.085 ms
for constraint client_parent_billing_client_id_fkey 0.648 ms 10 0.065 ms
for constraint clientwarehousefk 1.732 ms 10 0.173 ms
for constraint clobmobifk 0.869 ms 10 0.087 ms
for constraint clsmsifk 0.658 ms 10 0.066 ms
for constraint custcodecustfk 0.634 ms 10 0.063 ms
for constraint customer_list_dealer_id_fkey 0.698 ms 10 0.070 ms
for constraint customer_list_source_dealer_id_fkey 0.654 ms 10 0.065 ms
for constraint ddp_dlr_fk 1.359 ms 10 0.136 ms
for constraint dealer_performance_dealer_id_fkey 2.932 ms 10 0.293 ms
for constraint delivery_order_billing_client_id_fkey 2.939 ms 10 0.294 ms
for constraint dispdealerfk 0.809 ms 10 0.081 ms
for constraint dlrhistdlrfk 0.638 ms 10 0.064 ms
for constraint dlrhistwhfk 0.587 ms 10 0.059 ms
for constraint doorderedbyfk 2.354 ms 10 0.235 ms
for constraint driver_dealer_change_new_dealer_id_fkey 0.742 ms 10 0.074 ms
for constraint driver_dealer_change_old_dealer_id_fkey 0.729 ms 10 0.073 ms
for constraint driver_position_client_id_fkey 3.067 ms 10 0.307 ms
for constraint driverdealerfk 1.813 ms 10 0.181 ms
for constraint fk_client_from_adp_feed 0.620 ms 10 0.062 ms
for constraint fmpbilltoclientfk 0.666 ms 10 0.067 ms
for constraint fmplocwhfk 0.717 ms 10 0.072 ms
for constraint mergeclientfk 0.620 ms 10 0.062 ms
for constraint orderdestfk 2.226 ms 10 0.223 ms
for constraint ordersourcefk 2.230 ms 10 0.223 ms
for constraint origdestfk 0.759 ms 10 0.076 ms
for constraint origsourcefk 2.173 ms 10 0.217 ms
for constraint recurring_routes_alternate_endpoint_id_fkey 0.630 ms 10 0.063 ms
for constraint recurring_routes_alternate_startpoint_id_fkey 0.563 ms 10 0.056 ms
for constraint scheduled_run_warehouse_id_fkey 0.610 ms 10 0.061 ms
for constraint scheduled_run_warehouse_id_fkey1 0.559 ms 10 0.056 ms
for constraint scheduled_run_warehouse_id_fkey2 0.546 ms 10 0.055 ms
for constraint shiptoclientfk 0.548 ms 10 0.055 ms
for constraint signerclientfk 0.622 ms 10 0.062 ms
for constraint sr_client_map_client_id_fkey 0.667 ms 10 0.067 ms
for constraint transfer_history_from_client_id_fkey 1.467 ms 10 0.147 ms
for constraint transfer_history_to_client_id_fkey 1.393 ms 10 0.139 ms
for constraint vehicle_dispatch_map_dealer_id_fkey 0.698 ms 10 0.070 ms
for constraint vehicle_location_fk 1.463 ms 10 0.146 ms
for constraint vendor_client_id_fkey 0.606 ms 10 0.061 ms
for constraint warehousefk 0.827 ms 10 0.083 ms
for constraint zone_dispatch_fk 0.721 ms 10 0.072 ms
for constraint client_idfk 0.652 ms 10 0.065 ms
for constraint client_idfk 0.569 ms 10 0.057 ms
for constraint client_idfk 0.576 ms 10 0.058 ms
for constraint client_idfk 0.554 ms 10 0.055 ms
for constraint transfer_location_setting_local_client_id_fkey 0.560 ms 10 0.056 ms
for constraint sms_text_log_location_id_fkey 0.567 ms 10 0.057 ms
for constraint client_email_template_map_client_id_fkey 0.384 ms 10 0.038 ms
for constraint fk_pickup_source_id_map_to_source 0.659 ms 10 0.066 ms
for constraint driver_default_start_client_id_fkey 1.578 ms 10 0.158 ms
for constraint driver_default_end_client_id_fkey 1.385 ms 10 0.139 ms
for constraint customer_list_default_start_client_id_fkey 0.700 ms 10 0.070 ms
for constraint customer_list_default_end_client_id_fkey 0.659 ms 10 0.066 ms
for constraint scorev2_route_performance_by_dealer_summary_dealer_id_fkey 1.305 ms 10 0.131 ms
for constraint scorev2_driver_dealer_performance_dealer_id_fkey 18.208 ms 10 1.821 ms
for constraint scorev2_driver_dealer_performance_summary_dealer_id_fkey 1.290 ms 10 0.129 ms
for constraint driver_home_client_id_fkey 1.405 ms 10 0.141 ms
for constraint client_notification_recipient_client_id_fkey 3.452 ms 10 0.345 ms
for constraint location_id_fk 0.636 ms 10 0.064 ms