explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GJtu

Settings
# exclusive inclusive rows x rows loops node
1. 805.345 18,801.883 ↑ 1,727.2 31 1

GroupAggregate (cost=7,600,775.92..7,620,450.72 rows=53,544 width=46) (actual time=17,917.568..18,801.883 rows=31 loops=1)

  • Group Key: (date_part('epoch'::text, date_trunc('DAY'::text, ss.date))), c.groupe
2. 411.564 17,996.538 ↑ 2.9 646,630 1

Sort (cost=7,600,775.92..7,605,493.83 rows=1,887,164 width=35) (actual time=17,915.242..17,996.538 rows=646,630 loops=1)

  • Sort Key: (date_part('epoch'::text, date_trunc('DAY'::text, ss.date)))
  • Sort Method: external merge Disk: 29824kB
3. 1,847.724 17,584.974 ↑ 2.9 646,630 1

Hash Join (cost=198,773.66..7,352,455.94 rows=1,887,164 width=35) (actual time=3,339.171..17,584.974 rows=646,630 loops=1)

  • Hash Cond: ((ss.id_from_store)::text = (c.id_from_store)::text)
4. 12,595.747 15,737.106 ↓ 2.1 16,624,045 1

Bitmap Heap Scan on sales_summaries ss (cost=198,768.63..7,295,128.30 rows=7,737,371 width=24) (actual time=3,338.981..15,737.106 rows=16,624,045 loops=1)

  • Recheck Cond: ((date >= '2020-02-23 17:06:53.541+01'::timestamp with time zone) AND (date <= '2020-03-24 17:06:53.542+01'::timestamp with time zone))
  • Rows Removed by Index Recheck: 21862272
  • Heap Blocks: exact=615100 lossy=434639
5. 3,141.359 3,141.359 ↓ 2.3 17,412,269 1

Bitmap Index Scan on sales_summaries_date_id_idx (cost=0.00..196,834.28 rows=7,737,371 width=0) (actual time=3,141.359..3,141.359 rows=17,412,269 loops=1)

  • Index Cond: ((date >= '2020-02-23 17:06:53.541+01'::timestamp with time zone) AND (date <= '2020-03-24 17:06:53.542+01'::timestamp with time zone))
6. 0.044 0.144 ↓ 1.0 115 1

Hash (cost=3.66..3.66 rows=110 width=20) (actual time=0.144..0.144 rows=115 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
7. 0.100 0.100 ↓ 1.0 115 1

Seq Scan on categories c (cost=0.00..3.66 rows=110 width=20) (actual time=0.024..0.100 rows=115 loops=1)

  • Filter: ((libelle IS NOT NULL) AND ((groupe)::text = 'Téléphonie/MDP'::text))
  • Rows Removed by Filter: 26
Planning time : 0.661 ms
Execution time : 18,806.890 ms