explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rSDm

Settings
# exclusive inclusive rows x rows loops node
1. 2.399 6,691.550 ↓ 3.8 759 1

Finalize GroupAggregate (cost=539,590.43..539,644.10 rows=200 width=52) (actual time=6,688.388..6,691.550 rows=759 loops=1)

  • Group Key: curdate.curdate
2. 0.000 6,689.151 ↓ 3.8 1,507 1

Gather Merge (cost=539,590.43..539,637.10 rows=400 width=48) (actual time=6,688.363..6,689.151 rows=1,507 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.353 19,976.442 ↓ 2.5 502 3

Sort (cost=538,590.41..538,590.91 rows=200 width=48) (actual time=6,658.740..6,658.814 rows=502 loops=3)

  • Sort Key: curdate.curdate
  • Sort Method: quicksort Memory: 131kB
  • Worker 0: Sort Method: quicksort Memory: 78kB
  • Worker 1: Sort Method: quicksort Memory: 76kB
4. 7,056.624 19,975.089 ↓ 2.5 502 3

Partial HashAggregate (cost=538,580.26..538,582.76 rows=200 width=48) (actual time=6,657.791..6,658.363 rows=502 loops=3)

  • Group Key: curdate.curdate
5. 3,424.023 12,918.465 ↑ 4.4 4,487,438 3

Nested Loop (cost=0.43..391,927.14 rows=19,553,750 width=14) (actual time=0.225..4,306.155 rows=4,487,438 loops=3)

6. 81.984 81.984 ↑ 1.2 16,778 3

Parallel Index Only Scan using "contracts_cpv_cpvCode_fromdate_todate_amount_idx" on contracts_cpv sc (cost=0.43..847.13 rows=19,554 width=14) (actual time=0.072..27.328 rows=16,778 loops=3)

  • Index Cond: ("cpvCode" = '30190000-7'::text)
  • Heap Fetches: 0
7. 9,412.458 9,412.458 ↑ 3.7 267 50,334

Function Scan on generate_series curdate (cost=0.01..10.01 rows=1,000 width=8) (actual time=0.152..0.187 rows=267 loops=50,334)

Planning time : 0.382 ms
Execution time : 6,692.070 ms