explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XifM

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 4,279.547 ↑ 1.0 50 1

Limit (cost=660,480.82..660,480.95 rows=50 width=211) (actual time=4,279.540..4,279.547 rows=50 loops=1)

  • Planning time: 0.165 ms
  • Execution time: 4280.755 ms
2. 31.541 4,279.542 ↑ 5,939.7 50 1

Sort (cost=660,480.82..661,223.29 rows=296,986 width=211) (actual time=4,279.539..4,279.542 rows=50 loops=1)

  • Sort Key: ((sum(cost) / '1000000'::numeric)) DESC
  • Sort Method: top-N heapsort Memory: 47kB
3. 157.388 4,248.001 ↑ 3.9 75,242 1

Finalize GroupAggregate (cost=586,439.74..650,615.16 rows=296,986 width=211) (actual time=3,756.249..4,248.001 rows=75,242 loops=1)

  • Group Key: campaign, ad_group, keyword, search_terms, matchtype, accountid, keywordid, adgroupid, campaignid
4. 0.000 4,090.613 ↑ 2.0 168,430 1

Gather Merge (cost=586,439.74..629,194.53 rows=331,338 width=203) (actual time=3,756.233..4,090.613 rows=168,430 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
5. 237.867 26,465.488 ↑ 2.3 24,061 7

Partial GroupAggregate (cost=585,439.64..587,924.68 rows=55,223 width=203) (actual time=3,742.098..3,780.784 rows=24,061 loops=7)

  • Group Key: campaign, ad_group, keyword, search_terms, matchtype, accountid, keywordid, adgroupid, campaignid
6. 1,099.217 26,227.621 ↑ 1.1 51,115 7

Sort (cost=585,439.64..585,577.70 rows=55,223 width=179) (actual time=3,742.086..3,746.803 rows=51,115 loops=7)

  • Sort Key: campaign, ad_group, keyword, search_terms, matchtype, accountid, keywordid, adgroupid, campaignid
  • Sort Method: quicksort Memory: 16195kB
7. 25,128.404 25,128.404 ↑ 1.1 51,115 7

Parallel Seq Scan on search_terms (cost=0.00..581,090.01 rows=55,223 width=179) (actual time=3,458.707..3,589.772 rows=51,115 loops=7)

  • Filter: ((date >= '2019-04-07 00:00:00+00'::timestamp with time zone) AND (date <= '2019-04-14 00:00:00+00'::timestamp with time zone) AND (matchtype <> 'exact'::text))
  • Rows Removed by Filter: 1876821