explain.depesz.com

PostgreSQL's explain analyze made readable

Result: enXr

Settings
# exclusive inclusive rows x rows loops node
1. 490.762 55,053.095 ↓ 2.9 256,495 1

Hash Join (cost=30,063.06..1,295,021.21 rows=87,739 width=104) (actual time=17,272.362..55,053.095 rows=256,495 loops=1)

  • Hash Cond: (activitydata.contact_id = tmp_5458c6dfb85a40d98aac04f8702ce0bf.id)
2. 27,626.827 54,508.544 ↓ 2.9 256,495 1

Hash Join (cost=24,461.89..1,284,589.63 rows=87,739 width=112) (actual time=17,216.244..54,508.544 rows=256,495 loops=1)

  • Hash Cond: (activitydata.contact_id = tmp_e4ef6a8851b04fb699d37f8943b740a7.map_id)
  • Join Filter: ((activitydata.created_date >= tmp_e4ef6a8851b04fb699d37f8943b740a7.start) AND (activitydata.created_date <= tmp_e4ef6a8851b04fb699d37f8943b740a7."end"))
  • Rows Removed by Join Filter: 9634517
3. 11,391.338 26,836.934 ↓ 28.6 22,561,422 1

Bitmap Heap Scan on activitydata (cost=18,151.72..1,237,730.52 rows=789,650 width=104) (actual time=15,458.529..26,836.934 rows=22,561,422 loops=1)

  • Recheck Cond: ((activity_type)::text = ANY ('{EmailClickthrough,EmailOpen,FormSubmit,PageView,Subscribe,Unsubscribe,WebVisit}'::text[]))
  • Heap Blocks: exact=45028 lossy=1294153
4. 15,445.596 15,445.596 ↓ 28.6 22,561,422 1

Bitmap Index Scan on test_activity_type (cost=0.00..17,954.31 rows=789,650 width=0) (actual time=15,445.596..15,445.596 rows=22,561,422 loops=1)

  • Index Cond: ((activity_type)::text = ANY ('{EmailClickthrough,EmailOpen,FormSubmit,PageView,Subscribe,Unsubscribe,WebVisit}'::text[]))
5. 27.276 44.783 ↑ 1.0 181,652 1

Hash (cost=2,974.52..2,974.52 rows=181,652 width=24) (actual time=44.783..44.783 rows=181,652 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 2998kB
6. 17.507 17.507 ↑ 1.0 181,652 1

Seq Scan on tmp_e4ef6a8851b04fb699d37f8943b740a7 (cost=0.00..2,974.52 rows=181,652 width=24) (actual time=0.007..17.507 rows=181,652 loops=1)

7. 32.545 53.789 ↑ 1.0 181,652 1

Hash (cost=2,620.52..2,620.52 rows=181,652 width=8) (actual time=53.789..53.789 rows=181,652 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2792kB
8. 21.244 21.244 ↑ 1.0 181,652 1

Seq Scan on tmp_5458c6dfb85a40d98aac04f8702ce0bf (cost=0.00..2,620.52 rows=181,652 width=8) (actual time=0.006..21.244 rows=181,652 loops=1)