explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RwQF

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 0.015 ↓ 0.0 0 1

CTE Scan on _resolution (cost=99,320,592.88..102,740,928.63 rows=136,813,430 width=20) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: _resolution.document_id, _resolution.r_id, strpos(replace(_resolution.sub_deleted_str, '1+2'::text, '+'::text), '1'::text)
2.          

CTE _resolution

3. 0.002 0.013 ↓ 0.0 0 1

Recursive Union (cost=0.00..99,320,592.88 rows=136,813,430 width=48) (actual time=0.013..0.013 rows=0 loops=1)

4. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on rem_pkg.pre_temp_t5_hierarch r (cost=0.00..27.70 rows=1,770 width=18) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: r.document_id, r.r_id, r.sub_deleted_str
5. 0.002 0.003 ↓ 0.0 0 1

Nested Loop (cost=0.57..9,658,429.66 rows=13,681,166 width=48) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: r_1.document_id, r_1.id, ((_r.sub_deleted_str || '+'::text) || (COALESCE((CASE WHEN (r_1.vzamen = r_1.parent_id) THEN 2 ELSE (r_1.has_vzamen)::integer END)::character varying, ''::character varying))::text)
6. 0.001 0.001 ↓ 0.0 0 1

WorkTable Scan on _resolution _r (cost=0.00..354.00 rows=17,700 width=40) (actual time=0.001..0.001 rows=0 loops=1)

  • Output: _r.document_id, _r.r_id, _r.sub_deleted_str
7. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_resolution_parent_id on doc.resolution r_1 (cost=0.57..526.33 rows=773 width=34) (never executed)

  • Output: r_1.document_id, r_1.id, r_1.vzamen, r_1.parent_id, r_1.has_vzamen
  • Index Cond: (r_1.parent_id = _r.r_id)