explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Y5bY

Settings
# exclusive inclusive rows x rows loops node
1. 22.202 361.641 ↓ 8.7 6,177 1

GroupAggregate (cost=10,185.00..10,211.51 rows=707 width=145) (actual time=328.387..361.641 rows=6,177 loops=1)

  • Group Key: d_ts_campaign_widgets.traffic_source_internal_widget_id, d_ts_campaign_widgets.traffic_source_internal_widget_name
2. 129.722 339.439 ↓ 64.3 45,449 1

Sort (cost=10,185.00..10,186.76 rows=707 width=71) (actual time=328.356..339.439 rows=45,449 loops=1)

  • Sort Key: d_ts_campaign_widgets.traffic_source_internal_widget_id, d_ts_campaign_widgets.traffic_source_internal_widget_name
  • Sort Method: external merge Disk: 3504kB
3. 7.358 209.717 ↓ 64.3 45,449 1

Nested Loop (cost=712.34..10,151.54 rows=707 width=71) (actual time=14.075..209.717 rows=45,449 loops=1)

4. 6.000 66.012 ↓ 64.3 45,449 1

Nested Loop (cost=711.91..9,793.10 rows=707 width=26) (actual time=14.050..66.012 rows=45,449 loops=1)

5. 0.812 0.812 ↑ 1.0 1 1

Seq Scan on d_ts_campaigns (cost=0.00..108.16 rows=1 width=4) (actual time=0.753..0.812 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. 46.672 59.200 ↓ 18.9 45,449 1

Bitmap Heap Scan on f_ts_campaign_widget_stats (cost=711.91..9,660.91 rows=2,403 width=30) (actual time=13.290..59.200 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. 12.528 12.528 ↓ 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..711.31 rows=2,403 width=0) (actual time=12.528..12.528 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. 136.347 136.347 ↑ 1.0 1 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.003..0.003 rows=1 loops=45,449)

  • Index Cond: (d_ts_campaign_widget_id = f_ts_campaign_widget_stats.d_ts_campaign_widget_id)
Planning time : 1.140 ms
Execution time : 362.934 ms