explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XRD1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=6,423,134.13..6,423,134.14 rows=1 width=8) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,519.05..6,423,130.82 rows=1,325 width=0) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,518.77..1,558.52 rows=3,975 width=25) (actual rows= loops=)

  • Group Key: page_views.user_id
4. 0.000 0.000 ↓ 0.0

Seq Scan on page_views (cost=0.00..1,486.66 rows=12,844 width=25) (actual rows= loops=)

  • Filter: ((data ->> 'data_env_channel'::text) = 'WEB_DESKTOP'::text)
5. 0.000 0.000 ↓ 0.0

Index Only Scan using users_pkey on users (cost=0.28..1,615.48 rows=1 width=25) (actual rows= loops=)

  • Index Cond: (id = page_views.user_id)
  • Filter: ((SubPlan 1) > 2)
6.          

SubPlan (forIndex Only Scan)

7. 0.000 0.000 ↓ 0.0

Aggregate (cost=1,615.10..1,615.11 rows=1 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on page_views page_views_1 (cost=0.00..1,615.10 rows=1 width=0) (actual rows= loops=)

  • Filter: ((users.id = user_id) AND ((data ->> 'data_env_channel'::text) = 'WEB_DESKTOP'::text) AND ("timestamp" > (now() - '1 day'::interval)))