explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EUke

Settings
# exclusive inclusive rows x rows loops node
1. 0.208 7.100 ↓ 0.0 0 1

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

2. 0.010 6.892 ↑ 1.0 10 1

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

3. 0.010 6.822 ↑ 1.0 10 1

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

  • Group Key: "ANY_subquery".id
4. 0.026 6.812 ↑ 1.0 10 1

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

5. 0.001 6.786 ↑ 1.0 10 1

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

6. 1.332 6.785 ↑ 131,323.8 10 1

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

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

  • Heap Fetches: 1,345
8. 3.826 3.826 ↑ 131.9 9,953 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.826 rows=9,953 loops=1)

  • Heap Fetches: 9,953
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 : 0.828 ms
Execution time : 161.387 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint client_external_service_client_id_fkey 0.653 ms 10 0.065 ms
for constraint client_external_client_lookup_client_id_fkey 0.563 ms 10 0.056 ms
for constraint vehicle_base_rate_client_id_fkey 0.562 ms 10 0.056 ms
for constraint quote_billing_client_id_fkey 0.571 ms 10 0.057 ms
for constraint order_group_client_id_fkey 0.410 ms 10 0.041 ms
for constraint customer_exclusions_client_id_fkey 0.661 ms 10 0.066 ms
for constraint client_id_fk 0.569 ms 10 0.057 ms
for constraint adp_customer_client_id_fkey 1.625 ms 10 0.163 ms
for constraint adp_customer_parent_id_fkey 0.619 ms 10 0.062 ms
for constraint adpcust_dlr_fk 1.784 ms 10 0.178 ms
for constraint adporder_dlr_fk 1.525 ms 10 0.152 ms
for constraint agent_drop_point_id_fkey 0.610 ms 10 0.061 ms
for constraint cdmcustfktwo 6.304 ms 10 0.630 ms
for constraint cdmdlrfktwo 1.487 ms 10 0.149 ms
for constraint client_idfk 13.061 ms 10 1.306 ms
for constraint client_idfk 52.148 ms 10 5.215 ms
for constraint client_idfk 0.725 ms 10 0.072 ms
for constraint client_parent_billing_client_id_fkey 0.654 ms 10 0.065 ms
for constraint clientwarehousefk 2.103 ms 10 0.210 ms
for constraint clobmobifk 0.947 ms 10 0.095 ms
for constraint clsmsifk 0.669 ms 10 0.067 ms
for constraint custcodecustfk 0.632 ms 10 0.063 ms
for constraint customer_list_dealer_id_fkey 0.689 ms 10 0.069 ms
for constraint customer_list_source_dealer_id_fkey 0.738 ms 10 0.074 ms
for constraint ddp_dlr_fk 1.289 ms 10 0.129 ms
for constraint dealer_performance_dealer_id_fkey 3.012 ms 10 0.301 ms
for constraint delivery_order_billing_client_id_fkey 3.048 ms 10 0.305 ms
for constraint dispdealerfk 0.943 ms 10 0.094 ms
for constraint dlrhistdlrfk 0.674 ms 10 0.067 ms
for constraint dlrhistwhfk 0.625 ms 10 0.062 ms
for constraint doorderedbyfk 2.389 ms 10 0.239 ms
for constraint driver_dealer_change_new_dealer_id_fkey 0.998 ms 10 0.100 ms
for constraint driver_dealer_change_old_dealer_id_fkey 0.697 ms 10 0.070 ms
for constraint driver_position_client_id_fkey 3.292 ms 10 0.329 ms
for constraint driverdealerfk 2.147 ms 10 0.215 ms
for constraint fk_client_from_adp_feed 0.729 ms 10 0.073 ms
for constraint fmpbilltoclientfk 0.715 ms 10 0.071 ms
for constraint fmplocwhfk 0.760 ms 10 0.076 ms
for constraint mergeclientfk 0.675 ms 10 0.068 ms
for constraint orderdestfk 2.331 ms 10 0.233 ms
for constraint ordersourcefk 2.393 ms 10 0.239 ms
for constraint origdestfk 0.905 ms 10 0.090 ms
for constraint origsourcefk 2.280 ms 10 0.228 ms
for constraint recurring_routes_alternate_endpoint_id_fkey 0.661 ms 10 0.066 ms
for constraint recurring_routes_alternate_startpoint_id_fkey 0.591 ms 10 0.059 ms
for constraint scheduled_run_warehouse_id_fkey 0.653 ms 10 0.065 ms
for constraint scheduled_run_warehouse_id_fkey1 0.587 ms 10 0.059 ms
for constraint scheduled_run_warehouse_id_fkey2 0.590 ms 10 0.059 ms
for constraint shiptoclientfk 0.654 ms 10 0.065 ms
for constraint signerclientfk 0.696 ms 10 0.070 ms
for constraint sr_client_map_client_id_fkey 0.697 ms 10 0.070 ms
for constraint transfer_history_from_client_id_fkey 1.556 ms 10 0.156 ms
for constraint transfer_history_to_client_id_fkey 1.744 ms 10 0.174 ms
for constraint vehicle_dispatch_map_dealer_id_fkey 0.702 ms 10 0.070 ms
for constraint vehicle_location_fk 1.469 ms 10 0.147 ms
for constraint vendor_client_id_fkey 0.627 ms 10 0.063 ms
for constraint warehousefk 0.687 ms 10 0.069 ms
for constraint zone_dispatch_fk 0.707 ms 10 0.071 ms
for constraint client_idfk 0.681 ms 10 0.068 ms
for constraint client_idfk 0.605 ms 10 0.060 ms
for constraint client_idfk 0.598 ms 10 0.060 ms
for constraint client_idfk 0.586 ms 10 0.059 ms
for constraint transfer_location_setting_local_client_id_fkey 0.598 ms 10 0.060 ms
for constraint sms_text_log_location_id_fkey 0.791 ms 10 0.079 ms
for constraint client_email_template_map_client_id_fkey 0.429 ms 10 0.043 ms
for constraint fk_pickup_source_id_map_to_source 0.694 ms 10 0.069 ms
for constraint driver_default_start_client_id_fkey 1.470 ms 10 0.147 ms
for constraint driver_default_end_client_id_fkey 1.477 ms 10 0.148 ms
for constraint customer_list_default_start_client_id_fkey 1.847 ms 10 0.185 ms
for constraint customer_list_default_end_client_id_fkey 0.732 ms 10 0.073 ms
for constraint scorev2_route_performance_by_dealer_summary_dealer_id_fkey 1.312 ms 10 0.131 ms
for constraint scorev2_driver_dealer_performance_dealer_id_fkey 1.816 ms 10 0.182 ms
for constraint scorev2_driver_dealer_performance_summary_dealer_id_fkey 1.275 ms 10 0.128 ms
for constraint driver_home_client_id_fkey 1.447 ms 10 0.145 ms
for constraint client_notification_recipient_client_id_fkey 3.699 ms 10 0.370 ms
for constraint location_id_fk 0.636 ms 10 0.064 ms