explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SYm

Settings
# exclusive inclusive rows x rows loops node
1. 10.601 91.375 ↑ 1.0 4,561 1

HashAggregate (cost=1,466.55..1,512.22 rows=4,567 width=94) (actual time=89.028..91.375 rows=4,561 loops=1)

  • Output: c.id, ('c'::text), c.i_message_id_c, c.o_message_id_c, (NULL::text), (array_agg(d.state ORDER BY d.id)), (array_agg(d.id ORDER BY d.id)), (array_agg(COALESCE(d.dlr_in_time_dt, d.i_time_dt) ORDER BY d.id)), (array_agg((CASE WHEN (d.dlr_in_time_dt IS NULL) THEN 1 ELSE 0 END)::smallint ORDER BY d.id)), (array_agg(d.dlr_in_time_resp_dt ORDER BY d.id))
  • Group Key: c.id, 'c'::text, c.i_message_id_c, c.o_message_id_c, NULL::text, array_agg(d.state ORDER BY d.id), array_agg(d.id ORDER BY d.id), array_agg(COALESCE(d.dlr_in_time_dt, d.i_time_dt) ORDER BY d.id), array_agg((CASE WHEN (d.dlr_in_time_dt IS NULL) THEN 1 ELSE 0 END)::smallint ORDER BY d.id), array_agg(d.dlr_in_time_resp_dt ORDER BY d.id)
  • Buffers: shared hit=2001
2. 56.813 80.774 ↑ 1.0 4,561 1

GroupAggregate (cost=1,158.28..1,352.38 rows=4,567 width=94) (actual time=23.030..80.774 rows=4,561 loops=1)

  • Output: c.id, 'c'::text, c.i_message_id_c, c.o_message_id_c, NULL::text, array_agg(d.state ORDER BY d.id), array_agg(d.id ORDER BY d.id), array_agg(COALESCE(d.dlr_in_time_dt, d.i_time_dt) ORDER BY d.id), array_agg((CASE WHEN (d.dlr_in_time_dt IS NULL) THEN 1 ELSE 0 END)::smallint ORDER BY d.id), array_agg(d.dlr_in_time_resp_dt ORDER BY d.id)
  • Group Key: c.id
  • Buffers: shared hit=2001
3. 3.528 23.961 ↓ 1.0 4,585 1

Sort (cost=1,158.28..1,169.70 rows=4,567 width=94) (actual time=22.986..23.961 rows=4,585 loops=1)

  • Output: c.id, c.i_message_id_c, c.o_message_id_c, d.state, d.id, d.dlr_in_time_dt, d.i_time_dt, d.dlr_in_time_resp_dt
  • Sort Key: c.id
  • Sort Method: quicksort Memory: 886kB
  • Buffers: shared hit=2001
4. 6.539 20.433 ↓ 1.0 4,585 1

Hash Left Join (cost=264.39..880.67 rows=4,567 width=94) (actual time=6.104..20.433 rows=4,585 loops=1)

  • Output: c.id, c.i_message_id_c, c.o_message_id_c, d.state, d.id, d.dlr_in_time_dt, d.i_time_dt, d.dlr_in_time_resp_dt
  • Hash Cond: (c.c_sms_id = d.sms)
  • Join Filter: (c.c_status = 3)
  • Buffers: shared hit=2001
5. 7.851 7.851 ↑ 1.0 4,561 1

Index Scan using cdr_20200314_pkey on smscdr.cdr_20200314 c (cost=0.29..583.22 rows=4,567 width=72) (actual time=0.039..7.851 rows=4,561 loops=1)

  • Output: c.id, c.c_sms_id, c.c_route_num, c.c_attempt, c.c_is_last, c.c_status, c.c_code, c.i_code, c.o_code, c.i_ip, c.o_ip, c.i_port, c.o_port, c.c_src_rtg_num, c.c_dst_rtg_num, c.c_lrn, c.c_rtg_num, c.c_dst_mccmnc, c.i_src_num, c.o_src_num, c.i_dst_num, c.o_dst_num, c.i_src_num_ton, c.o_src_num_ton, c.i_dst_num_ton, c.o_dst_num_ton, c.i_src_num_npi, c.o_src_num_npi, c.i_dst_num_npi, c.o_dst_num_npi, c.i_username, c.o_username, c.i_time, c.i_time_resp, c.o_time, c.o_time_resp, c.i_cust_id, c.o_vend_id, c.i_gw_id, c.o_gw_id, c.i_rate_plan_id, c.i_deck_id, c.i_area_id, c.o_rate_plan_id, c.i_rate_id, c.o_rate_id, c.i_route_plan_id, c.o_route_plan_id, c.i_rate_sys, c.o_rate_sys, c.i_currency, c.o_currency, c.i_rate, c.o_rate, c.o_dp_id, c.i_account_id, c.o_account_id, c.c_src_num, c.c_dst_num, c.c_src_lrn, c.c_dst_lrn, c.c_src_state, c.c_dst_state, c.c_src_lata, c.c_dst_lata, c.c_src_ocn, c.c_dst_ocn, c.i_seq, c.o_seq, c.i_ip_local, c.o_ip_local, c.i_port_local, c.o_port_local, c.i_message_id_c, c.o_message_id_c, c.c_sm_body, c.i_seq_ref_num, c.i_seq_total_segments, c.i_seq_segment_num, c.i_seq_id, c.c_tags, c.o_trunk_id, c.i_trunk_id, c.o_sm_body, c.o_route_id, c.o_prefix, c.o_tags, c.o_area_name, c.c_src_num_ton, c.c_src_num_npi, c.c_dst_num_ton, c.c_dst_num_npi, c.c_src_mccmnc, c.i_prefix, c.c_jurisdiction
  • Index Cond: ((c.id > 16610283) AND (c.id <= 16620283))
  • Filter: ((c.i_time >= '2020-03-14 00:00:00'::timestamp without time zone) AND (c.i_time < '2020-03-15 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=1201
6. 1.610 6.043 ↓ 1.0 3,754 1

Hash (cost=217.51..217.51 rows=3,727 width=42) (actual time=6.043..6.043 rows=3,754 loops=1)

  • Output: d.state, d.id, d.dlr_in_time_dt, d.i_time_dt, d.dlr_in_time_resp_dt, d.sms
  • Buckets: 4096 Batches: 1 Memory Usage: 326kB
  • Buffers: shared hit=800
7. 4.433 4.433 ↓ 1.0 3,754 1

Index Scan using dlr_20200314_pkey on smscdr.dlr_20200314 d (cost=0.29..217.51 rows=3,727 width=42) (actual time=0.031..4.433 rows=3,754 loops=1)

  • Output: d.state, d.id, d.dlr_in_time_dt, d.i_time_dt, d.dlr_in_time_resp_dt, d.sms
  • Index Cond: ((d.id > 16610283) AND (d.id <= 16620283))
  • Filter: ((d.sms_in_time >= 1584144000) AND (d.sms_in_time < 1584230400))
  • Buffers: shared hit=800
Planning time : 1.263 ms
Execution time : 92.001 ms