explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dpuLd : Optimization for: Optimization for: Optimization for: plan #Tsso; plan #FqSQ; plan #QOP8

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.786 5,525.533 ↑ 100.0 2 1

GroupAggregate (cost=3,295,758,766.63..3,295,809,539.63 rows=200 width=36) (actual time=5,525.066..5,525.533 rows=2 loops=1)

  • Group Key: days.date
2. 0.912 5,524.747 ↑ 1,275.0 3,982 1

Sort (cost=3,295,758,766.63..3,295,771,459.26 rows=5,077,050 width=22) (actual time=5,524.579..5,524.747 rows=3,982 loops=1)

  • Sort Key: days.date
  • Sort Method: quicksort Memory: 408kB
3. 2.592 5,523.835 ↑ 1,275.0 3,982 1

Nested Loop (cost=0.57..3,294,985,053.00 rows=5,077,050 width=22) (actual time=6.747..5,523.835 rows=3,982 loops=1)

4. 0.200 0.200 ↑ 1.0 1,991 1

Seq Scan on segment (cost=0.00..28.91 rows=1,991 width=4) (actual time=0.014..0.200 rows=1,991 loops=1)

5. 0.000 5,521.043 ↑ 1,275.0 2 1,991

Nested Loop (cost=0.57..1,654,914.24 rows=2,550 width=22) (actual time=1.382..2.773 rows=2 loops=1,991)

6. 1.991 1.991 ↑ 1,275.0 2 1,991

Seq Scan on days (cost=0.00..35.50 rows=2,550 width=4) (actual time=0.000..0.001 rows=2 loops=1,991)

7. 3.982 5,519.052 ↑ 1.0 1 3,982

Limit (cost=0.57..648.95 rows=1 width=58) (actual time=1.386..1.386 rows=1 loops=3,982)

8. 5,515.070 5,515.070 ↑ 1,672.0 1 3,982

Index Scan Backward using event_series_created_on_key on event_series (cost=0.57..1,084,099.54 rows=1,672 width=58) (actual time=1.385..1.385 rows=1 loops=3,982)

  • Index Cond: ((created_at < days.date) AND (key = 'key6'::text) AND (entity_id = segment.entity_id))
Planning time : 0.362 ms
Execution time : 5,525.586 ms