explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VWq1 : Optimization for: plan #79d4

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.870 1,119.656 ↑ 1.0 1 1

Aggregate (cost=26,795.11..26,795.12 rows=1 width=8) (actual time=1,119.656..1,119.656 rows=1 loops=1)

2. 0.336 1,118.786 ↑ 162.9 5,000 1

Nested Loop (cost=0.55..24,759.02 rows=814,435 width=0) (actual time=0.247..1,118.786 rows=5,000 loops=1)

3. 2.204 3.450 ↓ 5.0 5,000 1

Result (cost=0.00..25.02 rows=1,000 width=32) (actual time=0.003..3.450 rows=5,000 loops=1)

4. 1.241 1.246 ↓ 5.0 5,000 1

ProjectSet (cost=0.00..5.02 rows=1,000 width=4) (actual time=0.002..1.246 rows=5,000 loops=1)

5. 0.005 0.005 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.005 rows=1 loops=1)

6. 5.000 1,115.000 ↑ 5.0 1 5,000

Append (cost=0.55..24.67 rows=5 width=8) (actual time=0.187..0.223 rows=1 loops=5,000)

7. 1,110.000 1,110.000 ↑ 5.0 1 5,000

Index Scan using event_series_created_on_key_1 on event_series_partitioned_customer_1 (cost=0.55..24.65 rows=5 width=8) (actual time=0.187..0.222 rows=1 loops=5,000)

  • Index Cond: ((CURRENT_TIMESTAMP <@ valid) AND (entity_id = ((((generate_series(1, 5000)))::text || '_1'::text))))
  • Filter: (customer_id = '1'::text)
Planning time : 0.742 ms
Execution time : 1,119.714 ms