explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dJXb

Settings
# exclusive inclusive rows x rows loops node
1. 0.113 322,099.238 ↓ 11.0 11 1

GroupAggregate (cost=459,478.19..459,478.21 rows=1 width=23) (actual time=322,099.144..322,099.238 rows=11 loops=1)

  • Group Key: e.event
2. 1.555 322,099.125 ↓ 895.0 895 1

Sort (cost=459,478.19..459,478.20 rows=1 width=15) (actual time=322,099.086..322,099.125 rows=895 loops=1)

  • Sort Key: e.event
  • Sort Method: quicksort Memory: 79kB
3. 96.191 322,097.570 ↓ 895.0 895 1

Hash Join (cost=94,067.46..459,478.18 rows=1 width=15) (actual time=418.660..322,097.570 rows=895 loops=1)

  • Hash Cond: ((e.anonymous_id)::text = (p.anonymous_id)::text)
4. 321,589.714 322,001.355 ↓ 5.5 236,485 1

Bitmap Heap Scan on events e (cost=94,059.00..459,357.38 rows=42,801 width=36) (actual time=417.051..322,001.355 rows=236,485 loops=1)

  • Recheck Cond: ((event IS NOT NULL) AND ("timestamp" >= (CURRENT_DATE - '30 days'::interval day)))
  • Rows Removed by Index Recheck: 1249927
  • Filter: ((site_id)::text = 'eq4xTsvKZZYX3Nyb1hajkkwZdO03'::text)
  • Rows Removed by Filter: 756467
  • Heap Blocks: exact=22624 lossy=352419
5. 13.946 411.641 ↓ 0.0 0 1

BitmapAnd (cost=94,059.00..94,059.00 rows=104,860 width=0) (actual time=411.641..411.641 rows=0 loops=1)

6. 163.523 163.523 ↓ 1.8 2,658,664 1

Bitmap Index Scan on events_event_idx (cost=0.00..27,395.45 rows=1,443,051 width=0) (actual time=163.523..163.523 rows=2,658,664 loops=1)

  • Index Cond: (event IS NOT NULL)
7. 234.172 234.172 ↓ 1.1 3,871,184 1

Bitmap Index Scan on events_timestamp_idx (cost=0.00..66,641.90 rows=3,550,578 width=0) (actual time=234.172..234.172 rows=3,871,184 loops=1)

  • Index Cond: ("timestamp" >= (CURRENT_DATE - '30 days'::interval day))
8. 0.003 0.024 ↑ 1.0 1 1

Hash (cost=8.44..8.44 rows=1 width=33) (actual time=0.023..0.024 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.021 0.021 ↑ 1.0 1 1

Index Scan using profiles_pkey on profiles p (cost=0.42..8.44 rows=1 width=33) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: ((id)::text = 'aid_859fb58c-18c2-4df3-b82e-935b8e425466'::text)
Planning time : 0.477 ms
Execution time : 322,100.333 ms