explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.728 819.099 ↑ 1.0 1 1

Aggregate (cost=133,357.81..133,357.82 rows=1 width=8) (actual time=819.098..819.099 rows=1 loops=1)

2. 2.467 818.371 ↑ 799.7 5,000 1

Nested Loop (cost=0.55..123,361.00 rows=3,998,725 width=0) (actual time=0.263..818.371 rows=5,000 loops=1)

3. 0.904 0.904 ↑ 1.0 5,000 1

Seq Scan on entities (cost=0.00..73.00 rows=5,000 width=32) (actual time=0.018..0.904 rows=5,000 loops=1)

4. 5.000 815.000 ↑ 5.0 1 5,000

Append (cost=0.55..24.61 rows=5 width=8) (actual time=0.136..0.163 rows=1 loops=5,000)

5. 810.000 810.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.58 rows=5 width=8) (actual time=0.135..0.162 rows=1 loops=5,000)

  • Index Cond: ((CURRENT_TIMESTAMP <@ valid) AND (entity_id = entities.entities))
  • Filter: (customer_id = '1'::text)
Planning time : 0.703 ms
Execution time : 819.148 ms