explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0jT3 : Optimization for: plan #79d4

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.672 784.924 ↑ 1.0 1 1

Aggregate (cost=26,769.69..26,769.70 rows=1 width=8) (actual time=784.923..784.924 rows=1 loops=1)

2. 1.938 784.252 ↑ 160.5 5,000 1

Nested Loop (cost=0.55..24,763.02 rows=802,670 width=0) (actual time=0.175..784.252 rows=5,000 loops=1)

3. 1.496 2.314 ↓ 5.0 5,000 1

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

4. 0.817 0.818 ↓ 5.0 5,000 1

ProjectSet (cost=0.00..5.02 rows=1,000 width=4) (actual time=0.001..0.818 rows=5,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. 5.000 780.000 ↑ 5.0 1 5,000

Append (cost=0.55..24.68 rows=5 width=8) (actual time=0.129..0.156 rows=1 loops=5,000)

7. 775.000 775.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.129..0.155 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.619 ms
Execution time : 784.973 ms