explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gsrK

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 0.152 ↑ 26.0 1 1

Sort (cost=6,328.27..6,328.34 rows=26 width=1,032) (actual time=0.152..0.152 rows=1 loops=1)

  • Output: job_parent.parent_job_id, job_parent.child_job_id
  • Sort Key: job_parent.parent_job_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21 read=2
  • I/O Timings: read=0.016
2.          

CTE job_parent

3. 0.002 0.139 ↑ 1,722.0 3 1

Recursive Union (cost=0.69..6,211.43 rows=5,166 width=558) (actual time=0.050..0.139 rows=3 loops=1)

  • Buffers: shared hit=21 read=2
  • I/O Timings: read=0.016
4. 0.050 0.050 ↑ 6.0 1 1

Index Scan using linked_entity_internal_id_idx on public.linked_entity (cost=0.69..7.31 rows=6 width=558) (actual time=0.049..0.050 rows=1 loops=1)

  • Output: (linked_entity.job_id)::character varying(512), linked_entity.entity_id
  • Index Cond: (((linked_entity.entity_type)::text = 'HITMAN_JOB'::text) AND ((linked_entity.entity_environment)::text = 'PRODUCTION'::text) AND (linked_entity.entity_custom_environment_url IS NULL) AND ((linked_entity.entity_id)::text = '42803219'::text))
  • Buffers: shared hit=5 read=1
  • I/O Timings: read=0.007
5. 0.009 0.087 ↑ 516.0 1 3

Nested Loop (cost=0.69..610.08 rows=516 width=558) (actual time=0.028..0.029 rows=1 loops=3)

  • Output: (linked_entity_1.job_id)::character varying(512), linked_entity_1.entity_id
  • Buffers: shared hit=16 read=1
  • I/O Timings: read=0.009
6. 0.000 0.000 ↑ 60.0 1 3

WorkTable Scan on job_parent job_parent_1 (cost=0.00..1.20 rows=60 width=516) (actual time=0.000..0.000 rows=1 loops=3)

  • Output: job_parent_1.parent_job_id, job_parent_1.child_job_id
7. 0.078 0.078 ↑ 9.0 1 3

Index Scan using linked_entity_internal_id_idx on public.linked_entity linked_entity_1 (cost=0.69..9.99 rows=9 width=50) (actual time=0.026..0.026 rows=1 loops=3)

  • Output: linked_entity_1.job_id, linked_entity_1.entity_key, linked_entity_1.index, linked_entity_1.entity_type, linked_entity_1.entity_value, linked_entity_1.updated_ts, linked_entity_1.entity_environment, linked_entity_1.entity_custom_environment_url, linked_entity_1.entity_id
  • Index Cond: (((linked_entity_1.entity_type)::text = 'HITMAN_JOB'::text) AND ((linked_entity_1.entity_environment)::text = 'PRODUCTION'::text) AND (linked_entity_1.entity_custom_environment_url IS NULL) AND ((linked_entity_1.entity_id)::text = (job_parent_1.parent_job_id)::text))
  • Buffers: shared hit=16 read=1
  • I/O Timings: read=0.009
8. 0.143 0.143 ↑ 26.0 1 1

CTE Scan on job_parent (cost=0.00..116.23 rows=26 width=1,032) (actual time=0.052..0.143 rows=1 loops=1)

  • Output: job_parent.parent_job_id, job_parent.child_job_id
  • Filter: ((job_parent.child_job_id)::text = '42803219'::text)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=21 read=2
  • I/O Timings: read=0.016