explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KPSi

Settings
# exclusive inclusive rows x rows loops node
1. 0.161 8,339.937 ↑ 1.0 1 1

Aggregate (cost=14.98..14.99 rows=1 width=8) (actual time=8,339.936..8,339.937 rows=1 loops=1)

2. 7.544 8,339.776 ↓ 676.0 676 1

Nested Loop (cost=0.84..14.97 rows=1 width=8) (actual time=3,884.680..8,339.776 rows=676 loops=1)

  • Join Filter: (offer.task_id = (max(offer_1.task_id)))
  • Rows Removed by Join Filter: 24,636
3. 1.420 1.420 ↓ 3,164.0 3,164 1

Index Scan using offer_pkey on offer (cost=0.42..7.47 rows=1 width=16) (actual time=0.031..1.420 rows=3,164 loops=1)

  • Index Cond: ((tyden = 42) AND (rok = 2,020) AND (kod_odb = 'A P1'::bpchar))
4. 5,356.652 8,330.812 ↓ 8.0 8 3,164

GroupAggregate (cost=0.42..7.48 rows=1 width=15) (actual time=0.039..2.633 rows=8 loops=3,164)

  • Group Key: offer_1.rok, offer_1.tyden, offer_1.kod_odb
5. 2,974.160 2,974.160 ↓ 4,492.0 4,492 3,164

Index Scan using offer_tyden_rok_kod_odb_idx on offer offer_1 (cost=0.42..7.46 rows=1 width=15) (actual time=0.006..0.940 rows=4,492 loops=3,164)

  • Index Cond: ((tyden = 42) AND (rok = 2,020))
Planning time : 0.592 ms
Execution time : 8,340.011 ms