explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3pgg

Settings
# exclusive inclusive rows x rows loops node
1. 0.041 11,330.852 ↑ 1.0 500 1

Limit (cost=2,586,694.05..2,586,695.30 rows=500 width=569) (actual time=11,330.727..11,330.852 rows=500 loops=1)

2. 2.106 11,330.811 ↑ 52.0 500 1

Sort (cost=2,586,694.05..2,586,759.06 rows=26,004 width=569) (actual time=11,330.726..11,330.811 rows=500 loops=1)

  • Sort Key: created_at
  • Sort Method: top-N heapsort Memory: 162kB
3. 9,809.906 11,328.705 ↑ 3.5 7,469 1

Bitmap Heap Scan on email_events "emailEvents" (cost=521,689.89..2,585,398.30 rows=26,004 width=569) (actual time=11,309.698..11,328.705 rows=7,469 loops=1)

  • Recheck Cond: ((tenant_key)::text = 'f39bb1d3c69e2ae9217182ab3f3a0311f5c469311c66ceedcde9547def8076f9'::text)
  • Rows Removed by Index Recheck: 28,680,211
  • Filter: ((NOT fetched) AND ((batch IS NULL) OR (batch_expiration <= '2020-02-02 00:00:00'::timestamp without time zone)))
  • Rows Removed by Filter: 7,155,823
  • Heap Blocks: exact=37,045 lossy=1,086,512
4. 1,518.799 1,518.799 ↓ 1.0 7,190,925 1

Bitmap Index Scan on ix_email_events_tenant_key_template_id (cost=0.00..521,683.39 rows=7,086,227 width=0) (actual time=1,518.799..1,518.799 rows=7,190,925 loops=1)

  • Index Cond: ((tenant_key)::text = 'f39bb1d3c69e2ae9217182ab3f3a0311f5c469311c66ceedcde9547def8076f9'::text)
Planning time : 0.155 ms
Execution time : 11,331.158 ms