explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oStc

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.704 86.456 ↑ 1.0 419 1

Unique (cost=7,676.46..7,853.89 rows=433 width=156) (actual time=75.461..86.456 rows=419 loops=1)

  • Output: stg_network_links.id, stg_network_links.from_item_id, stg_network_links.to_item_id, al.effective_date, stg_network_links.products, (CASE WHEN (1 = ANY (stg_network_links.products)) THEN al.oil_percentage ELSE '0'::numeric END), al.link_id, ((al.effective_date)::date), al.submission_date, al.updated_at
  • Buffers: shared hit=788, temp read=645 written=645
2. 58.386 83.752 ↑ 1.0 35,162 1

Sort (cost=7,676.46..7,765.18 rows=35,487 width=156) (actual time=75.461..83.752 rows=35,162 loops=1)

  • Output: stg_network_links.id, stg_network_links.from_item_id, stg_network_links.to_item_id, al.effective_date, stg_network_links.products, (CASE WHEN (1 = ANY (stg_network_links.products)) THEN al.oil_percentage ELSE '0'::numeric END), al.link_id, ((al.effective_date)::date), al.submission_date, al.updated_at
  • Sort Key: stg_network_links.id, ((al.effective_date)::date) DESC, stg_network_links.products, al.submission_date DESC, al.updated_at DESC
  • Sort Method: external merge Disk: 5,144kB
  • Buffers: shared hit=788, temp read=645 written=645
3. 20.356 25.366 ↑ 1.0 35,162 1

Hash Join (cost=26.11..2,201.53 rows=35,487 width=156) (actual time=0.233..25.366 rows=35,162 loops=1)

  • Output: stg_network_links.id, stg_network_links.from_item_id, stg_network_links.to_item_id, al.effective_date, stg_network_links.products, CASE WHEN (1 = ANY (stg_network_links.products)) THEN al.oil_percentage ELSE '0'::numeric END, al.link_id, (al.effective_date)::date, al.submission_date, al.updated_at
  • Hash Cond: (al.link_id = stg_network_links.id)
  • Buffers: shared hit=788
4. 4.795 4.795 ↑ 1.0 37,180 1

Seq Scan on compass.stg_allocations al (cost=0.00..1,148.81 rows=37,181 width=50) (actual time=0.007..4.795 rows=37,180 loops=1)

  • Output: al.id, al.organization_id, al.created_at, al.updated_at, al.effective_date, al.submission_date, al.tz, al.oil_percentage, al.gas_percentage, al.water_percentage, al.seq, al.link_id
  • Buffers: shared hit=777
5. 0.077 0.215 ↑ 1.0 419 1

Hash (cost=20.88..20.88 rows=419 width=80) (actual time=0.215..0.215 rows=419 loops=1)

  • Output: stg_network_links.id, stg_network_links.from_item_id, stg_network_links.to_item_id, stg_network_links.products
  • Buckets: 1,024 Batches: 1 Memory Usage: 55kB
  • Buffers: shared hit=11
6. 0.138 0.138 ↑ 1.0 419 1

Seq Scan on compass.stg_network_links (cost=0.00..20.88 rows=419 width=80) (actual time=0.006..0.138 rows=419 loops=1)

  • Output: stg_network_links.id, stg_network_links.from_item_id, stg_network_links.to_item_id, stg_network_links.products
  • Filter: (1 = ANY (stg_network_links.products))
  • Rows Removed by Filter: 26
  • Buffers: shared hit=11