explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A66L

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 11,831.383 ↑ 125.0 4 1

Limit (cost=2,586,906.05..2,586,907.30 rows=500 width=569) (actual time=11,831.382..11,831.383 rows=4 loops=1)

2. 0.021 11,831.382 ↑ 6,501.0 4 1

Sort (cost=2,586,906.05..2,586,971.06 rows=26,004 width=569) (actual time=11,831.382..11,831.382 rows=4 loops=1)

  • Sort Key: created_at
  • Sort Method: quicksort Memory: 27kB
3. 10,463.991 11,831.361 ↑ 6,501.0 4 1

Bitmap Heap Scan on email_events "emailEvents" (cost=521,901.89..2,585,610.30 rows=26,004 width=569) (actual time=11,827.076..11,831.361 rows=4 loops=1)

  • Recheck Cond: ((tenant_key)::text = 'f39bb1d3c69e2ae9217182ab3f3a0311f5c469311c66ceedcde9547def8076f9'::text)
  • Rows Removed by Index Recheck: 28,687,739
  • 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,182,045
  • Heap Blocks: exact=37,114 lossy=1,086,513
4. 1,367.370 1,367.370 ↓ 1.0 7,211,733 1

Bitmap Index Scan on ix_email_events_tenant_key_template_id (cost=0.00..521,895.39 rows=7,086,227 width=0) (actual time=1,367.370..1,367.370 rows=7,211,733 loops=1)

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