explain.depesz.com

PostgreSQL's explain analyze made readable

Result: s0qO

Settings
# exclusive inclusive rows x rows loops node
1. 38,006.341 307,928.314 ↓ 5.2 47,707 1

HashAggregate (cost=2,576,670.90..2,576,785.39 rows=9,159 width=39) (actual time=307,891.709..307,928.314 rows=47,707 loops=1)

  • Group Key: product_id
2. 263,776.133 269,921.973 ↓ 1.0 30,914,110 1

Bitmap Heap Scan on fact_sales_transaction_product (cost=578,535.86..2,422,299.75 rows=30,874,231 width=13) (actual time=6,157.233..269,921.973 rows=30,914,110 loops=1)

  • Recheck Cond: (trn_date >= '2018-01-01'::date)
  • Rows Removed by Index Recheck: 1011095
  • Heap Blocks: exact=25161 lossy=448763
3. 6,145.840 6,145.840 ↓ 1.0 31,571,975 1

Bitmap Index Scan on test_fact_sales_transaction_product_trn_date_index (cost=0.00..570,817.30 rows=30,874,231 width=0) (actual time=6,145.840..6,145.840 rows=31,571,975 loops=1)

  • Index Cond: (trn_date >= '2018-01-01'::date)
Planning time : 0.204 ms
Execution time : 307,932.655 ms