explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tsso

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.008 226.708 ↑ 500.0 2 1

Planning Time: 0.255 msNested Loop (cost=1,611,114.12..1,611,099,176.84 rows=1,000 width=12) (actual time=112.085..226.708 rows=2 loops=1)

2. 226.672 226.672 ↑ 1.0 1 2

Limit (cost=1,611,099.11..1,611,099.12 rows=1 width=8) (actual time=113.335..113.336 rows=1 loops=2)

3. 0.005 0.028 ↑ 500.0 2 1

CTE Scan on days (cost=0.00..20.00 rows=1,000 width=4) (actual time=0.019..0.028 rows=2 loops=1)

4. 0.000 0.023 ↑ 500.0 2 1

Function Scan on generate_series dd (cost=0.01..15.01 rows=1,000 width=4) (actual time=0.017..0.023 rows=2 loops=1)

5. 12.514 226.666 ↑ 1.0 1 2

Aggregate (cost=1,611,099.11..1,611,099.12 rows=1 width=8) (actual time=113.333..113.333 rows=1 loops=2)

6. 214.152 214.152 ↑ 3.7 136,602 2

Index Only Scan using event_series_created_on_key on event_series (cost=0.57..1,609,849.04 rows=500,029 width=0) (actual time=0.027..107.076 rows=136,602 loops=2)

  • Index Cond: ((created_at < days.date) AND (created_at > (days.date - '1 day'::interval)) AND (key = 'key6'::text))
  • Heap Fetches: 273,203
Execution time : 226.774 ms