explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ME51

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 466.553 ↓ 10.0 10 1

Limit (cost=38,844.73..38,844.73 rows=1 width=4,316) (actual time=466.550..466.553 rows=10 loops=1)

  • Buffers: shared hit=304399, temp written=9029
2.          

CTE tb

3. 132.243 255.803 ↑ 1.0 176,017 1

Merge Join (cost=4.94..32,128.11 rows=179,109 width=781) (actual time=0.040..255.803 rows=176,017 loops=1)

  • Buffers: shared hit=304399
4. 66.504 66.504 ↑ 1.0 176,017 1

Index Scan using etm_task_basic_info_pkey on etm_task_basic_info tbi (cost=0.42..21,009.84 rows=176,895 width=647) (actual time=0.015..66.504 rows=176,017 loops=1)

  • Buffers: shared hit=156164
5. 57.056 57.056 ↑ 1.0 176,017 1

Index Scan using ix_orch_task_alloc_tid on etm_task_alloc_info ta (cost=0.42..8,516.06 rows=179,109 width=142) (actual time=0.015..57.056 rows=176,017 loops=1)

  • Buffers: shared hit=148235
6. 2.613 466.549 ↓ 12.0 12 1

Sort (cost=6,716.61..6,716.62 rows=1 width=4,316) (actual time=466.548..466.549 rows=12 loops=1)

  • Sort Method: top-N heapsort Memory: 37kB
  • Buffers: shared hit=304399, temp written=9029
7. 6.174 463.936 ↓ 6,168.0 6,168 1

WindowAgg (cost=0.00..6,716.60 rows=1 width=4,316) (actual time=461.906..463.936 rows=6,168 loops=1)

  • Buffers: shared hit=304399, temp written=9029
8. 457.762 457.762 ↓ 6,168.0 6,168 1

CTE Scan on tb tb (cost=0.00..6,716.59 rows=1 width=4,308) (actual time=239.957..457.762 rows=6,168 loops=1)

  • Filter: ((((tb.last_mod_by)::text <> 'AdminUser-'::text) OR (tb.last_mod_by IS NULL)) AND (tb.queue_id = 4) AND ((tb.work_status) ::text = 'ASSIGNED'::text) AND ((tb.correlation_ty)::text = ANY ('{RoleUI_Type,SystemPolicy_Type,User_Type}'::text[])) AND ((tb.scope_id)::text = ANY ('{4 1296,41298,41300,41302,41000}'::text[])))
  • Buffers: shared hit=304399, temp written=9029