explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2p0Y

Settings
# exclusive inclusive rows x rows loops node
1. 137,255.186 140,475.675 ↓ 819.8 81,978 1

HashAggregate (cost=37.72..38.72 rows=100 width=152) (actual time=126,231.104..140,475.675 rows=81,978 loops=1)

  • Group Key: u.week, u.company_id, u.consumed_resource_uri, u.consumption_type, u.id_type
2.          

CTE unnested

3. 531.232 2,678.183 ↓ 11,015.4 1,101,542 1

ProjectSet (cost=0.44..8.97 rows=100 width=90) (actual time=0.206..2,678.183 rows=1,101,542 loops=1)

4. 2,146.951 2,146.951 ↓ 129,631.0 129,631 1

Index Scan using discover_ids_minute_idx on discover_ids_mrel (cost=0.44..8.46 rows=1 width=201) (actual time=0.099..2,146.951 rows=129,631 loops=1)

  • Index Cond: ((minute < now()) AND (minute >= (now() - '00:05:00'::interval)))
5. 3,220.489 3,220.489 ↓ 11,015.4 1,101,542 1

CTE Scan on unnested u (cost=0.00..2.00 rows=100 width=144) (actual time=0.208..3,220.489 rows=1,101,542 loops=1)