explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1sPg

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 30.339 9,105.787 ↓ 8.7 6,177 1

GroupAggregate (cost=59,846.92..59,873.43 rows=707 width=146) (actual time=9,060.511..9,105.787 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. 136.089 9,075.448 ↓ 64.3 45,449 1

Sort (cost=59,846.92..59,848.69 rows=707 width=72) (actual time=9,060.474..9,075.448 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. 43.813 8,939.359 ↓ 64.3 45,449 1

Nested Loop (cost=50,320.85..59,813.46 rows=707 width=72) (actual time=4,782.603..8,939.359 rows=45,449 loops=1)

4. 11.178 5,077.830 ↓ 64.3 45,449 1

Nested Loop (cost=50,320.42..59,455.04 rows=707 width=26) (actual time=4,766.070..5,077.830 rows=45,449 loops=1)

5. 0.879 0.879 ↑ 1.0 1 1

Seq Scan on d_ts_campaigns (cost=0.00..108.16 rows=1 width=4) (actual time=0.806..0.879 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. 301.439 5,065.773 ↓ 18.9 45,449 1

Bitmap Heap Scan on f_ts_campaign_widget_stats (cost=50,320.42..59,322.84 rows=2,404 width=30) (actual time=4,765.257..5,065.773 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))
  • Filter: (end_date <= '2019-11-26 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 12116
  • Heap Blocks: exact=5538
7. 0.608 4,764.334 ↓ 0.0 0 1

BitmapAnd (cost=50,320.42..50,320.42 rows=2,418 width=0) (actual time=4,764.334..4,764.334 rows=0 loops=1)

8. 24.228 24.228 ↓ 2.6 57,565 1

Bitmap Index Scan on idx_f_ts_campaign_widget_stats_d_ts_campaign_id (cost=0.00..409.36 rows=21,989 width=0) (actual time=24.228..24.228 rows=57,565 loops=1)

  • Index Cond: (d_ts_campaign_id = d_ts_campaigns.d_ts_campaign_id)
9. 4,739.498 4,739.498 ↓ 1.1 2,357,594 1

Bitmap Index Scan on f_ts_campaign_widget_stats_ne_start_date_d_ts_campaign_id_d_key (cost=0.00..49,377.81 rows=2,142,033 width=0) (actual time=4,739.498..4,739.498 rows=2,357,594 loops=1)

  • Index Cond: (start_date >= '2019-11-01 00:00:00'::timestamp without time zone)
10. 3,817.716 3,817.716 ↑ 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=54) (actual time=0.084..0.084 rows=1 loops=45,449)

  • Index Cond: (d_ts_campaign_widget_id = f_ts_campaign_widget_stats.d_ts_campaign_widget_id)
Planning time : 7.404 ms
Execution time : 9,107.316 ms