explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f5pR

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 1,875.749 ↑ 83.3 6 1

Limit (cost=225,651.97..225,652.22 rows=500 width=48) (actual time=1,875.748..1,875.749 rows=6 loops=1)

2. 0.044 1,875.746 ↑ 284.0 6 1

Sort (cost=225,651.97..225,652.83 rows=1,704 width=48) (actual time=1,875.745..1,875.746 rows=6 loops=1)

  • Sort Key: (to_char((date_trunc('month'::text, timezone('America/New_York'::text, blog_page_views."time"))), 'YYYY-MM'::text)) DESC
  • Sort Method: quicksort Memory: 25kB
3. 166.933 1,875.702 ↑ 284.0 6 1

GroupAggregate (cost=225,623.06..225,634.99 rows=1,704 width=48) (actual time=1,747.475..1,875.702 rows=6 loops=1)

  • Group Key: (date_trunc('month'::text, timezone('America/New_York'::text, blog_page_views."time")))
4. 58.296 1,708.769 ↓ 52.1 88,800 1

Sort (cost=225,623.06..225,623.92 rows=1,704 width=53) (actual time=1,692.934..1,708.769 rows=88,800 loops=1)

  • Sort Key: (date_trunc('month'::text, timezone('America/New_York'::text, blog_page_views."time")))
  • Sort Method: quicksort Memory: 15,560kB
5. 3.903 1,650.473 ↓ 52.1 88,800 1

Gather (cost=1,267.07..225,604.77 rows=1,704 width=53) (actual time=2.619..1,650.473 rows=88,800 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
6. 62.834 1,646.570 ↓ 44.3 44,400 2 / 2

Hash Join (cost=267.07..224,434.37 rows=1,002 width=53) (actual time=2.777..1,646.570 rows=44,400 loops=2)

  • Hash Cond: (articles.site_id = sites.id)
7. 352.867 1,583.706 ↑ 1.2 44,400 2 / 2

Hash Join (cost=264.87..224,399.43 rows=54,392 width=49) (actual time=2.437..1,583.706 rows=44,400 loops=2)

  • Hash Cond: (((blog_page_views.properties ->> 'id'::text))::integer = articles.id)
8. 1,228.502 1,228.502 ↑ 1.2 44,400 2 / 2

Parallel Seq Scan on ahoy_events blog_page_views (cost=0.00..224,101.78 rows=54,392 width=153) (actual time=0.056..1,228.502 rows=44,400 loops=2)

  • Filter: (("time" >= '2019-05-01 04:00:00+00'::timestamp with time zone) AND ("time" < '2019-11-01 04:00:00+00'::timestamp with time zone) AND ((name)::text = 'Controller:blog_posts#show'::text))
  • Rows Removed by Filter: 3,268,103
9. 0.432 2.337 ↑ 1.0 1,519 2 / 2

Hash (cost=259.56..259.56 rows=1,519 width=8) (actual time=2.337..2.337 rows=1,519 loops=2)

  • Buckets: 2,048 Batches: 1 Memory Usage: 76kB
10. 1.905 1.905 ↑ 1.0 1,519 2 / 2

Seq Scan on articles (cost=0.00..259.56 rows=1,519 width=8) (actual time=0.012..1.905 rows=1,519 loops=2)

11. 0.006 0.030 ↑ 1.0 1 2 / 2

Hash (cost=2.19..2.19 rows=1 width=4) (actual time=0.030..0.030 rows=1 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
12. 0.024 0.024 ↑ 1.0 1 2 / 2

Seq Scan on sites (cost=0.00..2.19 rows=1 width=4) (actual time=0.016..0.024 rows=1 loops=2)

  • Filter: ((name)::text = 'Blog'::text)
  • Rows Removed by Filter: 54