explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WQeo

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 601.900 ↓ 1.3 7,181 1

Finalize GroupAggregate (cost=66,266.00..67,778.42 rows=5,743 width=36) (actual time=597.557..601.900 rows=7,181 loops=1)

  • Group Key: denorm_ads.advertiser_id
2. 15.776 608.371 ↑ 1.1 10,853 1

Gather Merge (cost=66,266.00..67,606.13 rows=11,486 width=28) (actual time=597.550..608.371 rows=10,853 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.144 592.595 ↑ 1.6 3,618 3 / 3

Sort (cost=65,265.98..65,280.33 rows=5,743 width=28) (actual time=592.343..592.595 rows=3,618 loops=3)

  • Sort Key: denorm_ads.advertiser_id
  • Sort Method: quicksort Memory: 389kB
  • Worker 0: Sort Method: quicksort Memory: 356kB
  • Worker 1: Sort Method: quicksort Memory: 392kB
4. 126.428 591.451 ↑ 1.6 3,618 3 / 3

Partial HashAggregate (cost=64,849.96..64,907.39 rows=5,743 width=28) (actual time=590.899..591.451 rows=3,618 loops=3)

  • Group Key: denorm_ads.advertiser_id
5. 211.368 465.023 ↑ 2.3 647,145 3 / 3

Parallel Hash Join (cost=20,314.04..49,867.43 rows=1,498,253 width=20) (actual time=276.879..465.023 rows=647,145 loops=3)

  • Hash Cond: (denorm_ads.show_id = sc.show_id)
6. 31.001 124.613 ↑ 3.4 58,142 3 / 3

Parallel Hash Join (cost=7,178.59..25,263.61 rows=200,424 width=28) (actual time=43.929..124.613 rows=58,142 loops=3)

  • Hash Cond: (denorm_ads.processed_episode_id = ier.processed_episode_id)
7. 50.626 50.626 ↑ 1.2 138,140 3 / 3

Parallel Seq Scan on denorm_ads (cost=0.00..17,642.73 rows=168,489 width=36) (actual time=0.047..50.626 rows=138,140 loops=3)

  • Filter: (("position" = 1) AND (category = 0))
  • Rows Removed by Filter: 124192
8. 20.317 42.986 ↑ 1.3 62,021 3 / 3

Parallel Hash (cost=6,186.23..6,186.23 rows=79,389 width=8) (actual time=42.986..42.986 rows=62,021 loops=3)

  • Buckets: 262144 Batches: 1 Memory Usage: 9376kB
9. 22.669 22.669 ↑ 1.3 62,021 3 / 3

Parallel Index Scan using index_intel_episode_rights_on_intel_report_id on intel_episode_rights ier (cost=0.43..6,186.23 rows=79,389 width=8) (actual time=0.742..22.669 rows=62,021 loops=3)

  • Index Cond: (intel_report_id = 26)
  • Filter: (activated_at IS NOT NULL)
  • Rows Removed by Filter: 1182
10. 76.273 129.042 ↑ 1.2 252,034 3 / 3

Parallel Hash (cost=7,966.43..7,966.43 rows=315,042 width=8) (actual time=129.041..129.042 rows=252,034 loops=3)

  • Buckets: 131072 Batches: 16 Memory Usage: 2912kB
11. 52.769 52.769 ↑ 1.2 252,034 3 / 3

Parallel Seq Scan on show_categories sc (cost=0.00..7,966.43 rows=315,042 width=8) (actual time=0.067..52.769 rows=252,034 loops=3)

Planning time : 0.655 ms
Execution time : 611.537 ms