explain.depesz.com

PostgreSQL's explain analyze made readable

Result: flmf

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 7,291.921 ↑ 1,702.0 3 1

Sort (cost=2,988,505.22..2,988,517.99 rows=5,106 width=1,032) (actual time=7,291.921..7,291.921 rows=3 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=5769770 read=10
  • I/O Timings: read=0.061
2.          

CTE job_parent

3. 0.031 7,291.896 ↑ 1,702.0 3 1

Recursive Union (cost=0.69..2,986,770.63 rows=5,106 width=558) (actual time=314.811..7,291.896 rows=3 loops=1)

  • Buffers: shared hit=5769770 read=10
  • I/O Timings: read=0.061
4. 377.816 377.816 ↑ 6.0 1 1

Index Scan using linked_entity_internal_id_idx on public.linked_entity (cost=0.69..7,732.65 rows=6 width=558) (actual time=314.809..377.816 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_id)::text = '42803219'::text))
  • Buffers: shared hit=20549
5. 2,001.327 6,914.049 ↑ 510.0 1 3

Hash Join (cost=2.64..297,893.59 rows=510 width=558) (actual time=1,905.181..2,304.683 rows=1 loops=3)

  • Output: (linked_entity_1.job_id)::character varying(512), linked_entity_1.entity_id
  • Hash Cond: ((linked_entity_1.entity_id)::text = (job_parent_1.parent_job_id)::text)
  • Buffers: shared hit=5749221 read=10
  • I/O Timings: read=0.061
6. 4,912.707 4,912.707 ↓ 6.0 2,083,332 3

Index Scan using linked_entity_internal_id_idx on public.linked_entity linked_entity_1 (cost=0.69..296,581.48 rows=346,995 width=50) (actual time=0.029..1,637.569 rows=2,083,332 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))
  • Buffers: shared hit=5749221 read=10
  • I/O Timings: read=0.061
7. 0.009 0.015 ↑ 60.0 1 3

Hash (cost=1.20..1.20 rows=60 width=516) (actual time=0.005..0.005 rows=1 loops=3)

  • Output: job_parent_1.parent_job_id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.006 0.006 ↑ 60.0 1 3

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

  • Output: job_parent_1.parent_job_id
9. 7,291.904 7,291.904 ↑ 1,702.0 3 1

CTE Scan on job_parent (cost=0.00..102.12 rows=5,106 width=1,032) (actual time=314.813..7,291.904 rows=3 loops=1)

  • Output: job_parent.parent_job_id, job_parent.child_job_id
  • Buffers: shared hit=5769770 read=10
  • I/O Timings: read=0.061