explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LPLY : Optimization for: Optimization for: plan #79d4; plan #VWq1

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 20.770 58,044.133 ↑ 1.0 1 1

Aggregate (cost=26,788.90..26,788.91 rows=1 width=8) (actual time=58,044.132..58,044.133 rows=1 loops=1)

2. 59.379 58,023.363 ↑ 16.2 50,000 1

Nested Loop (cost=0.55..24,763.02 rows=810,355 width=0) (actual time=8.436..58,023.363 rows=50,000 loops=1)

3. 39.630 63.984 ↓ 50.0 50,000 1

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

4. 24.353 24.354 ↓ 50.0 50,000 1

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

5. 0.001 0.001 ↑ 1.0 1 1

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

6. 50.000 57,900.000 ↑ 5.0 1 50,000

Append (cost=0.55..24.68 rows=5 width=8) (actual time=0.569..1.158 rows=1 loops=50,000)

7. 57,850.000 57,850.000 ↑ 5.0 1 50,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.568..1.157 rows=1 loops=50,000)

  • Index Cond: ((CURRENT_TIMESTAMP <@ valid) AND (entity_id = ((((generate_series(1, 50000)))::text || '_1'::text))))
  • Filter: (customer_id = '1'::text)
Planning time : 19.293 ms
Execution time : 58,044.263 ms