explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ohsP

Settings
# exclusive inclusive rows x rows loops node
1. 484.235 6,844.552 ↑ 1.0 106,535 1

Hash Right Join (cost=236,008.00..279,125.07 rows=106,929 width=1,647) (actual time=5,623.552..6,844.552 rows=106,535 loops=1)

  • Hash Cond: (focus_calc.article_id = fbpostmetrics.article_id)
2. 37.261 5,780.119 ↓ 1.9 105,230 1

Subquery Scan on focus_calc (cost=142,685.36..151,829.42 rows=56,508 width=82) (actual time=5,042.818..5,780.119 rows=105,230 loops=1)

3. 364.477 5,742.858 ↓ 1.9 105,230 1

GroupAggregate (cost=142,685.36..150,134.18 rows=56,508 width=66) (actual time=5,042.807..5,742.858 rows=105,230 loops=1)

  • Group Key: sub.article_id
4. 2,035.458 5,378.381 ↑ 1.0 165,030 1

Sort (cost=142,685.36..143,097.93 rows=165,030 width=186) (actual time=5,042.742..5,378.381 rows=165,030 loops=1)

  • Sort Key: sub.article_id
  • Sort Method: external merge Disk: 18520kB
5. 20.973 3,342.923 ↑ 1.0 165,030 1

Subquery Scan on sub (cost=94,173.10..113,151.55 rows=165,030 width=186) (actual time=801.734..3,342.923 rows=165,030 loops=1)

6. 2,323.133 3,321.950 ↑ 1.0 165,030 1

WindowAgg (cost=94,173.10..111,501.25 rows=165,030 width=234) (actual time=801.734..3,321.950 rows=165,030 loops=1)

7. 779.530 998.817 ↑ 1.0 165,030 1

Sort (cost=94,173.10..94,585.68 rows=165,030 width=106) (actual time=801.593..998.817 rows=165,030 loops=1)

  • Sort Key: fbpostmetrics_1.page_id, fbpostmetrics_1.type, fbpostmetrics_1.weekday, fbpostmetrics_1.subdomain, fbpostmetrics_1.published_at
  • Sort Method: external merge Disk: 19680kB
8. 219.287 219.287 ↑ 1.0 165,030 1

Seq Scan on fbpostmetrics fbpostmetrics_1 (cost=0.00..70,281.30 rows=165,030 width=106) (actual time=0.008..219.287 rows=165,030 loops=1)

9. 297.939 580.198 ↑ 1.0 106,535 1

Hash (cost=71,519.02..71,519.02 rows=106,929 width=1,543) (actual time=580.198..580.198 rows=106,535 loops=1)

  • Buckets: 8192 Batches: 32 Memory Usage: 5253kB
10. 282.259 282.259 ↑ 1.0 106,535 1

Seq Scan on fbpostmetrics (cost=0.00..71,519.02 rows=106,929 width=1,543) (actual time=0.021..282.259 rows=106,535 loops=1)

  • Filter: (published_at > (now() - '1 year 10 mons'::interval))
  • Rows Removed by Filter: 58495