explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ixXR

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

Nested Loop (cost=5,507,724.53..6,596,633.61 rows=1 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Subquery Scan on a (cost=5,507,722.99..6,596,598.66 rows=13 width=24) (actual rows= loops=)

  • Filter: ((a.orden = '1'::bigint) AND (a.product_code = '101103'::bpchar) AND (a.purchase_date = (CURRENT_DATE - '32 days'::interval)))
3. 0.000 0.000 ↓ 0.0

WindowAgg (cost=5,507,722.99..6,020,135.07 rows=25,620,604 width=1,604) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=5,507,722.99..5,571,774.50 rows=25,620,604 width=44) (actual rows= loops=)

  • Sort Key: mkt_product_sales_history_2019.msisdn, mkt_product_sales_history_2019.purchase_date DESC
5. 0.000 0.000 ↓ 0.0

Seq Scan on mkt_product_sales_history_2019 (cost=0.00..2,355,005.04 rows=25,620,604 width=44) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on sales_activations (cost=1.54..2.68 rows=1 width=8) (actual rows= loops=)

  • Recheck Cond: (subscriberid = a.subscriberid)
  • Filter: (((canal_venta)::text = 'CANAL FDV'::text) AND ((fecha)::date >= '2019-04-01'::date) AND ((fecha)::date >= '2019-04-01'::date) AND ((fecha)::date >= (CURRENT_DATE - '60 days'::interval)))
7. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_sales_activations_subscriberid (cost=0.00..1.54 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (subscriberid = a.subscriberid)