explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4o4hT : Optimization for: Optimization for: Optimization for: jobs; plan #Nv1p; plan #HZS3; plan #uUkG

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 460.076 6,437.075 ↑ 81.6 3,108 1

Hash Anti Join (cost=165.65..59,338.65 rows=253,529 width=1,326) (actual time=2,426.541..6,437.075 rows=3,108 loops=1)

  • Hash Cond: ((t.job_id)::text = (ticket_1.job_id)::text)
2. 907.412 5,610.692 ↓ 8.2 2,134,636 1

Nested Loop (cost=120.38..55,856.53 rows=261,739 width=1,326) (actual time=512.296..5,610.692 rows=2,134,636 loops=1)

3. 6.095 515.748 ↓ 210.1 4,622 1

HashAggregate (cost=46.83..47.05 rows=22 width=37) (actual time=512.180..515.748 rows=4,622 loops=1)

  • Group Key: (ticket.job_id)::text
4. 509.653 509.653 ↓ 210.1 4,622 1

Index Scan using idx_entity_op_created on ticket (cost=0.56..46.78 rows=22 width=37) (actual time=0.050..509.653 rows=4,622 loops=1)

  • Index Cond: (((op_type)::text = 'SDD_SNAPSHOT'::text) AND ((entity_id)::text = 'sdb-services-test10:sdb17'::text))
5. 3,651.380 4,187.532 ↑ 1.4 462 4,622

Bitmap Heap Scan on ticket t (cost=73.55..2,530.35 rows=644 width=1,326) (actual time=0.135..0.906 rows=462 loops=4,622)

  • Recheck Cond: ((job_id)::text = (ticket.job_id)::text)
  • Heap Blocks: exact=311540
6. 536.152 536.152 ↑ 1.4 465 4,622

Bitmap Index Scan on idx_job_op (cost=0.00..73.39 rows=644 width=0) (actual time=0.116..0.116 rows=465 loops=4,622)

  • Index Cond: ((job_id)::text = (ticket.job_id)::text)
7. 1.843 366.307 ↓ 219.8 4,615 1

Hash (cost=45.01..45.01 rows=21 width=37) (actual time=366.307..366.307 rows=4,615 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 375kB
8. 364.464 364.464 ↓ 219.8 4,615 1

Index Scan using idx_entity_op_created on ticket ticket_1 (cost=0.56..45.01 rows=21 width=37) (actual time=0.041..364.464 rows=4,615 loops=1)

  • Index Cond: (((op_type)::text = 'SDD_COPY_EXTENT_COMPLETE'::text) AND ((entity_id)::text = 'sdb-services-test10:sdb17'::text))
  • Filter: ((status)::text = ANY ('{COMPLETED,ABORT}'::text[]))
Planning time : 0.892 ms
Execution time : 6,437.327 ms