explain.depesz.com

PostgreSQL's explain analyze made readable

Result: khHS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=39,342,223.28..41,964,940.08 rows=9,545,604 width=68) (actual rows= loops=)

  • Group Key: a.advertiser_id
  • Filter: (sum(((ar.revenue_indexed_usd + ar.revenue_hj_usd) + ar.revenue_hjr_usd)) > '50'::numeric)
2.          

Initplan (forGroupAggregate)

3. 0.000 0.000 ↓ 0.0

RESULT (cost=0.62..0.67 rows=1 width=4) (actual rows= loops=)

4.          

Initplan (forRESULT)

5. 0.000 0.000 ↓ 0.0

LIMIT (cost=0.57..0.62 rows=1 width=4) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Only Scan Backward using pk_warehouse_fact_advertiser_revenue_2 on fact_advertiser_revenue (cost=0.57..15,533,204.07 rows=301,967,552 width=4) (actual rows= loops=)

  • Index Cond: (date_key IS NOT NULL)
7. 0.000 0.000 ↓ 0.0

Sort (cost=39,342,222.60..39,593,862.23 rows=100,655,851 width=15) (actual rows= loops=)

  • Sort Key: a.advertiser_id
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=8,408,951.92..24,733,906.19 rows=100,655,851 width=15) (actual rows= loops=)

  • Hash Cond: (ar.advertiser_key = a.advertiser_key)
9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on fact_advertiser_revenue ar (cost=1,466,111.42..13,235,766.58 rows=100,655,851 width=15) (actual rows= loops=)

  • Recheck Cond: (date_key > $1)
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pk_warehouse_fact_advertiser_revenue_2 (cost=0.00..1,440,947.45 rows=100,655,851 width=0) (actual rows= loops=)

  • Index Cond: (date_key > $1)
11. 0.000 0.000 ↓ 0.0

Hash (cost=4,254,642.64..4,254,642.64 rows=73,838,888 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan ON dim_advertiser a (cost=0.00..4,254,642.64 rows=73,838,888 width=8) (actual rows= loops=)