explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JL53

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 4,421.035 ↑ 1.0 1 1

GroupAggregate (cost=10,165.70..10,165.74 rows=1 width=145) (actual time=4,421.035..4,421.035 rows=1 loops=1)

  • Group Key: d_ts_campaign_widgets.traffic_source_internal_widget_id, d_ts_campaign_widgets.traffic_source_internal_widget_name
2. 0.067 4,421.007 ↓ 14.0 14 1

Sort (cost=10,165.70..10,165.70 rows=1 width=71) (actual time=4,421.005..4,421.007 rows=14 loops=1)

  • Sort Key: d_ts_campaign_widgets.traffic_source_internal_widget_name
  • Sort Method: quicksort Memory: 26kB
3. 0.875 4,420.940 ↓ 14.0 14 1

Nested Loop (cost=716.66..10,165.69 rows=1 width=71) (actual time=1,099.370..4,420.940 rows=14 loops=1)

4. 8.393 4,192.820 ↓ 64.2 45,449 1

Nested Loop (cost=716.23..9,805.02 rows=708 width=26) (actual time=11.472..4,192.820 rows=45,449 loops=1)

5. 1.053 1.053 ↑ 1.0 1 1

Seq Scan on d_ts_campaigns (cost=0.00..108.16 rows=1 width=4) (actual time=1.017..1.053 rows=1 loops=1)

  • Filter: ((account_traffic_source_id = 11) AND ((traffic_source_internal_campaign_id)::text = '3223666'::text))
  • Rows Removed by Filter: 3101
6. 4,173.765 4,183.374 ↓ 18.9 45,449 1

Bitmap Heap Scan on f_ts_campaign_widget_stats (cost=716.23..9,672.81 rows=2,405 width=30) (actual time=10.447..4,183.374 rows=45,449 loops=1)

  • Recheck Cond: ((d_ts_campaign_id = d_ts_campaigns.d_ts_campaign_id) AND (start_date >= '2019-11-01 00:00:00'::timestamp without time zone) AND (end_date <= '2019-11-26 00:00:00'::timestamp without time zone))
  • Heap Blocks: exact=4815
7. 9.609 9.609 ↓ 18.9 45,449 1

Bitmap Index Scan on idx_f_ts_campaign_widget_stats_d_ts_camp_d_ts_widg_id_start_end (cost=0.00..715.62 rows=2,405 width=0) (actual time=9.609..9.609 rows=45,449 loops=1)

  • Index Cond: ((d_ts_campaign_id = d_ts_campaigns.d_ts_campaign_id) AND (start_date >= '2019-11-01 00:00:00'::timestamp without time zone) AND (end_date <= '2019-11-26 00:00:00'::timestamp without time zone))
8. 227.245 227.245 ↓ 0.0 0 45,449

Index Scan using d_ts_campaign_widgets_pkey on d_ts_campaign_widgets (cost=0.43..0.51 rows=1 width=53) (actual time=0.005..0.005 rows=0 loops=45,449)

  • Index Cond: (d_ts_campaign_widget_id = f_ts_campaign_widget_stats.d_ts_campaign_widget_id)
  • Filter: ((traffic_source_internal_widget_id)::text = 'advertisecom-business'::text)
  • Rows Removed by Filter: 1
Planning time : 1.398 ms
Execution time : 4,421.206 ms