explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aH5O

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 8,802.278 ↑ 1.0 2 1

Limit (cost=5,124,535.13..5,124,535.49 rows=2 width=159) (actual time=8,797.785..8,802.278 rows=2 loops=1)

2. 0.236 8,802.274 ↑ 237,278.5 2 1

Finalize GroupAggregate (cost=5,124,535.13..5,209,914.13 rows=474,557 width=159) (actual time=8,797.783..8,802.274 rows=2 loops=1)

  • Group Key: a.brand_id, b.brand
3. 32.404 8,802.038 ↑ 24,976.8 19 1

Gather Merge (cost=5,124,535.13..5,184,999.83 rows=474,560 width=127) (actual time=8,797.222..8,802.038 rows=19 loops=1)

  • Workers Planned: 8
  • Workers Launched: 8
4. 77.388 8,769.634 ↑ 322.4 184 9 / 9

Partial GroupAggregate (cost=5,123,534.99..5,125,462.89 rows=59,320 width=127) (actual time=8,670.514..8,769.634 rows=184 loops=9)

  • Group Key: a.brand_id, b.brand
5. 1,080.461 8,692.246 ↓ 3.5 207,528 9 / 9

Sort (cost=5,123,534.99..5,123,683.29 rows=59,320 width=58) (actual time=8,670.474..8,692.246 rows=207,528 loops=9)

  • Sort Key: a.brand_id, b.brand
  • Sort Method: external sort Disk: 23,976kB
6. 101.213 7,611.785 ↓ 5.6 330,696 9 / 9

Merge Join (cost=5,117,703.86..5,118,832.03 rows=59,320 width=58) (actual time=7,423.987..7,611.785 rows=330,696 loops=9)

  • Merge Cond: ((a.brand_id)::text = (b.live_brand_id)::text)
7. 837.687 7,483.557 ↓ 6.6 331,096 9 / 9

Sort (cost=5,116,174.17..5,116,298.88 rows=49,882 width=44) (actual time=7,412.417..7,483.557 rows=331,096 loops=9)

  • Sort Key: a.brand_id
  • Sort Method: external merge Disk: 19,056kB
8. 157.336 6,645.870 ↓ 6.6 331,096 9 / 9

Hash Left Join (cost=1.64..5,112,281.82 rows=49,882 width=44) (actual time=5,610.453..6,645.870 rows=331,096 loops=9)

  • Hash Cond: (((a.product)::text = (c.product)::text) AND ((a.gametype_id)::integer = c.game_id))
9. 6,488.408 6,488.408 ↓ 6.6 331,096 9 / 9

Parallel Seq Scan on live_daily_summary a (cost=0.00..5,110,032.91 rows=49,882 width=66) (actual time=5,610.015..6,488.408 rows=331,096 loops=9)

  • Filter: (((product)::text = 'LIVE'::text) AND (date_trunc('month'::text, (summary)::timestamp with time zone) >= '2020-09-01 00:00:00+05:30'::timestamp with time zone) AND (date_trunc('month'::text, (summary)::timestamp with time zone) <= '2020-09-06 00:00:00+05:30'::timestamp with time zone))
  • Rows Removed by Filter: 8,617,918
10. 0.013 0.126 ↑ 1.0 8 9 / 9

Hash (cost=1.52..1.52 rows=8 width=9) (actual time=0.126..0.126 rows=8 loops=9)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 0.113 0.113 ↑ 1.0 8 9 / 9

Index Only Scan using games_releasedate_idx on games_info c (cost=0.28..1.52 rows=8 width=9) (actual time=0.110..0.113 rows=8 loops=9)

  • Index Cond: (product = 'LIVE'::text)
  • Heap Fetches: 0
12. 20.289 27.015 ↓ 55.8 336,108 9 / 9

Sort (cost=1,529.63..1,544.68 rows=6,020 width=19) (actual time=10.887..27.015 rows=336,108 loops=9)

  • Sort Key: b.live_brand_id
  • Sort Method: quicksort Memory: 554kB
13. 6.726 6.726 ↓ 1.0 6,021 9 / 9

Seq Scan on brand_info b (cost=0.00..1,151.71 rows=6,020 width=19) (actual time=0.056..6.726 rows=6,021 loops=9)

  • Filter: ((brand IS NOT NULL) AND (brand_deleted <> 1))
  • Rows Removed by Filter: 14,356
Planning time : 1.259 ms
Execution time : 8,870.131 ms