explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IBX1

Settings
# exclusive inclusive rows x rows loops node
1. 32.330 1,536.144 ↑ 4.5 32,205 1

Sort (cost=208,144.51..208,506.73 rows=144,887 width=20) (actual time=1,530.685..1,536.144 rows=32,205 loops=1)

  • Sort Key: t.created_on DESC
  • Sort Method: quicksort Memory: 2278kB
2. 25.650 1,503.814 ↑ 4.5 32,205 1

Hash Join (cost=5,212.86..195,724.38 rows=144,887 width=20) (actual time=582.895..1,503.814 rows=32,205 loops=1)

  • Hash Cond: (t.task_status_id = ts.id)
3. 925.352 1,478.140 ↑ 4.5 32,205 1

Bitmap Heap Scan on tasks t (cost=5,211.02..194,574.22 rows=144,887 width=24) (actual time=582.841..1,478.140 rows=32,205 loops=1)

  • Recheck Cond: (((completed_on >= CURRENT_DATE) AND (completed_on <= (CURRENT_DATE + '1 day'::interval))) OR (completed_on IS NULL))
  • Filter: ((task_status_id <> 7) AND ((call_id IS NULL) OR ((call_id IS NOT NULL) AND (user_id <> created_by) AND (user_id <> 1131))) AND (task_type_id = ANY ('{5,6,61,13,7}'::integer[])))
  • Rows Removed by Filter: 244326
  • Heap Blocks: exact=119661
4. 0.002 552.788 ↓ 0.0 0 1

BitmapOr (cost=5,211.02..5,211.02 rows=277,561 width=0) (actual time=552.788..552.788 rows=0 loops=1)

5. 0.023 0.023 ↓ 0.0 0 1

Bitmap Index Scan on tasks_completed_on_idx (cost=0.00..4.45 rows=1 width=0) (actual time=0.023..0.023 rows=0 loops=1)

  • Index Cond: ((completed_on >= CURRENT_DATE) AND (completed_on <= (CURRENT_DATE + '1 day'::interval)))
6. 552.763 552.763 ↑ 1.0 276,533 1

Bitmap Index Scan on tasks_completed_on_idx (cost=0.00..5,134.14 rows=277,561 width=0) (actual time=552.763..552.763 rows=276,533 loops=1)

  • Index Cond: (completed_on IS NULL)
7. 0.012 0.024 ↑ 1.0 37 1

Hash (cost=1.37..1.37 rows=37 width=4) (actual time=0.024..0.024 rows=37 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
8. 0.012 0.012 ↑ 1.0 37 1

Seq Scan on task_statuses ts (cost=0.00..1.37 rows=37 width=4) (actual time=0.006..0.012 rows=37 loops=1)