explain.depesz.com

PostgreSQL's explain analyze made readable

Result: unFl

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 279.134 ↑ 1.0 1 1

Sort (cost=192,605.15..192,605.15 rows=1 width=32) (actual time=279.133..279.134 rows=1 loops=1)

  • Sort Key: t.created_on DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.000 279.124 ↑ 1.0 1 1

Nested Loop (cost=6,076.16..192,605.14 rows=1 width=32) (actual time=278.468..279.124 rows=1 loops=1)

  • Join Filter: (t.task_status_id = ts.id)
3. 40.174 314.712 ↑ 1.0 1 1

Gather (cost=6,076.16..192,603.30 rows=1 width=24) (actual time=278.456..314.712 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 234.001 274.538 ↓ 0.0 0 3

Parallel Bitmap Heap Scan on tasks t (cost=5,076.16..191,603.20 rows=1 width=24) (actual time=274.537..274.538 rows=0 loops=3)

  • 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[])) AND (((created_on >= CURRENT_DATE) AND (created_on <= (CURRENT_DATE + '1 day'::interval))) OR ((completed_on >= CURRENT_DATE) AND (completed_on <= (CURRENT_DATE + '1 day'::interval)))))
  • Rows Removed by Filter: 92167
  • Heap Blocks: exact=58266
5. 0.003 40.537 ↓ 0.0 0 1

BitmapOr (cost=5,076.16..5,076.16 rows=274,572 width=0) (actual time=40.537..40.537 rows=0 loops=1)

6. 0.011 0.011 ↓ 0.0 0 1

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

  • Index Cond: ((completed_on >= CURRENT_DATE) AND (completed_on <= (CURRENT_DATE + '1 day'::interval)))
7. 40.523 40.523 ↓ 1.0 276,521 1

Bitmap Index Scan on idx_tasks_completed_on (cost=0.00..5,071.72 rows=274,572 width=0) (actual time=40.523..40.523 rows=276,521 loops=1)

  • Index Cond: (completed_on IS NULL)
8. 0.008 0.008 ↑ 37.0 1 1

Seq Scan on task_statuses ts (cost=0.00..1.37 rows=37 width=16) (actual time=0.008..0.008 rows=1 loops=1)