explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NYMA

Settings
# exclusive inclusive rows x rows loops node
1. 0.111 541.316 ↓ 6.2 37 1

HashAggregate (cost=119,222.82..119,222.89 rows=6 width=36) (actual time=541.302..541.316 rows=37 loops=1)

  • Group Key: GREATEST(tmp_0.date)
2.          

CTE tmp_0

3. 99.484 541.150 ↓ 6.2 37 1

GroupAggregate (cost=119,052.61..119,222.67 rows=6 width=12) (actual time=444.219..541.150 rows=37 loops=1)

  • Group Key: tn_event.date
4. 15.445 441.666 ↓ 1.1 25,912 1

Sort (cost=119,052.61..119,109.27 rows=22,667 width=24) (actual time=437.625..441.666 rows=25,912 loops=1)

  • Sort Key: tn_event.date
  • Sort Method: quicksort Memory: 2,793kB
5. 82.725 426.221 ↓ 1.1 25,912 1

Bitmap Heap Scan on tn_event (cost=44,505.85..117,412.84 rows=22,667 width=24) (actual time=348.824..426.221 rows=25,912 loops=1)

  • Recheck Cond: (((tn_event_key)::text = '$AppStart'::text) AND (date >= '2019-07-31'::date) AND (date <= '2020-08-02'::date))
  • Rows Removed by Index Recheck: 3,594
  • Heap Blocks: exact=14,980
6. 14.253 343.496 ↓ 0.0 0 1

BitmapAnd (cost=44,505.85..44,505.85 rows=22,667 width=0) (actual time=343.496..343.496 rows=0 loops=1)

7. 21.458 21.458 ↓ 1.5 76,579 1

Bitmap Index Scan on tn_event_key_index1 (cost=0.00..2,778.96 rows=52,604 width=0) (actual time=21.458..21.458 rows=76,579 loops=1)

  • Index Cond: ((tn_event_key)::text = '$AppStart'::text)
8. 307.785 307.785 ↓ 1.3 1,292,879 1

Bitmap Index Scan on tn_event_key_date_index1 (cost=0.00..41,715.31 rows=997,088 width=0) (actual time=307.785..307.785 rows=1,292,879 loops=1)

  • Index Cond: ((date >= '2019-07-31'::date) AND (date <= '2020-08-02'::date))
9. 541.205 541.205 ↓ 6.2 37 1

CTE Scan on tmp_0 (cost=0.00..0.12 rows=6 width=12) (actual time=444.228..541.205 rows=37 loops=1)

Planning time : 0.379 ms
Execution time : 542.158 ms