explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1Kq8

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

Finalize GroupAggregate (cost=10,122,499.91..10,123,128.63 rows=5,251 width=49) (actual rows= loops=)

  • Group Key: profiles.id
  • Filter: (count(*) >= 1)
2. 0.000 0.000 ↓ 0.0

Gather Merge (cost=10,122,499.91..10,123,043.30 rows=4,376 width=49) (actual rows= loops=)

  • Workers Planned: 2
3. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=10,121,499.88..10,121,538.17 rows=2,188 width=49) (actual rows= loops=)

  • Group Key: profiles.id
4. 0.000 0.000 ↓ 0.0

Sort (cost=10,121,499.88..10,121,505.35 rows=2,188 width=41) (actual rows= loops=)

  • Sort Key: profiles.id
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,585,614.56..10,121,378.50 rows=2,188 width=41) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,585,613.87..9,778,233.14 rows=45,287 width=41) (actual rows= loops=)

  • Hash Cond: ((events.anonymous_id)::text = (profiles.anonymous_id)::text)
7. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on events (cost=124,579.14..8,284,932.82 rows=1,191,844 width=30) (actual rows= loops=)

  • Recheck Cond: ((site_id)::text = '5e55213d0d8cdf000726e813'::text)
  • Filter: ((type)::text = 'page'::text)
8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on site_id_idx (cost=0.00..123,864.03 rows=3,389,262 width=0) (actual rows= loops=)

  • Index Cond: ((site_id)::text = '5e55213d0d8cdf000726e813'::text)
9. 0.000 0.000 ↓ 0.0

Hash (cost=1,435,551.13..1,435,551.13 rows=1,011,408 width=77) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on profiles (cost=20,159.43..1,435,551.13 rows=1,011,408 width=77) (actual rows= loops=)

  • Recheck Cond: ((arena_user_id IS NOT NULL) OR (user_id IS NOT NULL))
11. 0.000 0.000 ↓ 0.0

BitmapOr (cost=20,159.43..20,159.43 rows=1,012,362 width=0) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on arena_user_id_idx (cost=0.00..489.42 rows=25,731 width=0) (actual rows= loops=)

  • Index Cond: (arena_user_id IS NOT NULL)
13. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on user_id_idx (cost=0.00..19,164.30 rows=986,632 width=0) (actual rows= loops=)

  • Index Cond: (user_id IS NOT NULL)
14. 0.000 0.000 ↓ 0.0

Index Only Scan using profile_site_pkey on profile_site (cost=0.69..7.58 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((id = (profiles.id)::text) AND (site_id = '5e55213d0d8cdf000726e813'::text))