explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jr63

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 61,575.721 ↑ 41.5 29 1

Finalize GroupAggregate (cost=57,802.82..57,946.53 rows=1,203 width=153) (actual time=61,575.654..61,575.721 rows=29 loops=1)

  • Group Key: ga_campaign_creative.date, ga_campaign_creative.campaign, ga_campaign_creative.keyword, ga_campaign_creative.dimension21
2.          

Initplan (for Finalize GroupAggregate)

3. 0.006 352.735 ↑ 1.0 1 1

Result (cost=0.60..0.61 rows=1 width=4) (actual time=352.734..352.735 rows=1 loops=1)

4.          

Initplan (for Result)

5. 0.002 352.729 ↑ 1.0 1 1

Limit (cost=0.57..0.60 rows=1 width=4) (actual time=352.728..352.729 rows=1 loops=1)

6. 352.727 352.727 ↑ 284,376,797.0 1 1

Index Only Scan Backward using idx_22424699_date on ga_campaign_creative ga_campaign_creative_1 (cost=0.57..8,563,699.89 rows=284,376,797 width=4) (actual time=352.727..352.727 rows=1 loops=1)

  • Index Cond: (date IS NOT NULL)
  • Heap Fetches: 61,557
7. 359.488 61,577.227 ↑ 24.4 29 1

Gather Merge (cost=57,802.20..57,911.94 rows=708 width=153) (actual time=61,575.643..61,577.227 rows=29 loops=1)

  • Workers Planned: 1
  • Params Evaluated: $1
  • Workers Launched: 1
8. 0.051 61,217.739 ↑ 50.6 14 2 / 2

Partial GroupAggregate (cost=56,802.19..56,832.28 rows=708 width=153) (actual time=61,217.706..61,217.739 rows=14 loops=2)

  • Group Key: ga_campaign_creative.date, ga_campaign_creative.campaign, ga_campaign_creative.keyword, ga_campaign_creative.dimension21
9. 0.133 61,217.688 ↑ 8.4 84 2 / 2

Sort (cost=56,802.19..56,803.96 rows=708 width=129) (actual time=61,217.684..61,217.688 rows=84 loops=2)

  • Sort Key: ga_campaign_creative.campaign, ga_campaign_creative.keyword, ga_campaign_creative.dimension21
  • Sort Method: quicksort Memory: 45kB
  • Worker 0: Sort Method: quicksort Memory: 49kB
10. 1.156 61,217.555 ↑ 8.4 84 2 / 2

Parallel Hash Semi Join (cost=35,704.79..56,768.68 rows=708 width=129) (actual time=884.585..61,217.555 rows=84 loops=2)

  • Hash Cond: (ga_campaign_creative.dimension21 = regexp_replace((as_parameters.asparam)::text, '^.*='::text, ''::text))
11. 60,448.567 60,448.567 ↓ 4.3 6,140 2 / 2

Parallel Index Scan using idx_22424699_date on ga_campaign_creative (cost=0.57..19,188.08 rows=1,415 width=129) (actual time=41.604..60,448.567 rows=6,140 loops=2)

  • Index Cond: (date = ($1 - '5 days'::interval))
  • Filter: ((""left""(campaign, 1) <> '('::text) AND ((""left""(dimension21, 3) = '202'::text) OR (""left""(dimension21, 3) = '203'::text)))
  • Rows Removed by Filter: 135,588
12. 28.975 767.832 ↑ 2.1 13,751 2 / 2

Parallel Hash (cost=35,349.69..35,349.69 rows=28,362 width=16) (actual time=767.831..767.832 rows=13,751 loops=2)

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,048kB
13. 738.857 738.857 ↑ 2.1 13,751 2 / 2

Parallel Seq Scan on as_parameters (cost=0.00..35,349.69 rows=28,362 width=16) (actual time=1.290..738.857 rows=13,751 loops=2)

  • Filter: (((campaign)::text ~~ '%NLaunch%'::text) OR ((campaign)::text ~~ '%_G1%'::text))
  • Rows Removed by Filter: 584,840
Planning time : 31.900 ms