explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nWrW

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

Nested Loop Semi Join (cost=16,400.14..33,118.59 rows=1 width=4) (actual time=431.443..431.443 rows=0 loops=1)

  • Buffers: shared hit=86,532
2. 122.030 298.757 ↓ 4,461.6 249,851 1

Index Only Scan using i4 on public.ci_job_artifacts (cost=16,399.72..33,005.23 rows=56 width=8) (actual time=177.653..298.757 rows=249,851 loops=1)

  • Heap Fetches: 23,946
  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 1,000
  • Buffers: shared hit=86,532
3.          

SubPlan (for Index Only Scan)

4. 0.694 176.727 ↓ 1,000.0 1,000 1

Aggregate (cost=15,970.75..16,399.30 rows=1 width=8) (actual time=174.774..176.727 rows=1,000 loops=1)

  • Group Key: ci_job_artifacts_2.job_id
  • Buffers: shared hit=43,328
5. 0.700 176.033 ↓ 1,000.0 1,000 1

Merge Semi Join (cost=15,970.75..16,399.28 rows=1 width=8) (actual time=174.763..176.033 rows=1,000 loops=1)

  • Merge Cond: (ci_job_artifacts_2.job_id = ci_job_artifacts_3.job_id)
  • Buffers: shared hit=43,328
6. 92.228 174.838 ↓ 8.9 1,001 1

Sort (cost=15,970.33..15,970.61 rows=113 width=8) (actual time=174.675..174.838 rows=1,001 loops=1)

  • Sort Key: ci_job_artifacts_2.job_id
  • Sort Method: quicksort Memory: 17,903kB
  • Buffers: shared hit=43,204
7. 82.610 82.610 ↓ 2,219.9 250,851 1

Index Only Scan using i4 on public.ci_job_artifacts ci_job_artifacts_2 (cost=0.42..15,966.48 rows=113 width=8) (actual time=0.016..82.610 rows=250,851 loops=1)

  • Heap Fetches: 23,946
  • Buffers: shared hit=43,204
8. 0.495 0.495 ↑ 11.9 1,000 1

Index Only Scan using i5 on public.ci_job_artifacts ci_job_artifacts_3 (cost=0.42..398.74 rows=11,854 width=4) (actual time=0.076..0.495 rows=1,000 loops=1)

  • Index Cond: ((ci_job_artifacts_3.job_id >= 121,896,538) AND (ci_job_artifacts_3.job_id < 156158378))
  • Heap Fetches: 20
  • Buffers: shared hit=124
9. 0.000 0.000 ↓ 0.0 0 249,851

Index Only Scan using i5 on public.ci_job_artifacts ci_job_artifacts_1 (cost=0.42..2.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=249,851)

  • Index Cond: ((ci_job_artifacts_1.job_id = ci_job_artifacts.job_id) AND (ci_job_artifacts_1.job_id >= 121,896,538) AND (ci_job_artifacts_1.job_id < 156158378))
  • Heap Fetches: 0