explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bApD

Settings
# exclusive inclusive rows x rows loops node
1. 1.212 108.700 ↑ 5.6 410 1

Seq Scan on api_qname a (cost=504.95..150,765.01 rows=2,290 width=307) (actual time=107.733..108.700 rows=410 loops=1)

  • Filter: (alternatives: SubPlan 2 or hashed SubPlan 3)
  • Rows Removed by Filter: 4,177
2.          

CTE released_nexus_artifact

3. 0.620 100.203 ↓ 6.3 2,851 1

Nested Loop (cost=15.17..504.95 rows=452 width=48) (actual time=0.135..100.203 rows=2,851 loops=1)

  • Join Filter: (na.tenant_id = ps.tenant_id)
4. 0.069 0.118 ↑ 1.0 57 1

HashAggregate (cost=14.61..15.18 rows=57 width=54) (actual time=0.079..0.118 rows=57 loops=1)

  • Group Key: (ra.ga)::text, (ra.version)::text, ps.tenant_id
5. 0.009 0.049 ↑ 1.0 57 1

Nested Loop (cost=0.14..14.18 rows=57 width=54) (actual time=0.025..0.049 rows=57 loops=1)

6. 0.001 0.017 ↑ 1.0 1 1

Nested Loop (cost=0.14..9.31 rows=1 width=8) (actual time=0.017..0.017 rows=1 loops=1)

7. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on release r (cost=0.00..1.02 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: (id = 1)
  • Rows Removed by Filter: 1
8. 0.009 0.009 ↑ 1.0 1 1

Index Scan using platform_segment_pkey on platform_segment ps (cost=0.14..8.16 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = r.platform_segment_id)
9. 0.023 0.023 ↑ 1.0 57 1

Seq Scan on released_artifact ra (cost=0.00..4.30 rows=57 width=54) (actual time=0.007..0.023 rows=57 loops=1)

  • Filter: (release_id = 1)
  • Rows Removed by Filter: 47
10. 99.465 99.465 ↓ 50.0 50 57

Index Scan using nexus_artifact_unq on nexus_artifact na (cost=0.56..8.58 rows=1 width=57) (actual time=0.125..1.745 rows=50 loops=57)

  • Index Cond: (((ga)::text = (ra.ga)::text) AND ((version)::text = (ra.version)::text))
  • Filter: from_sources
  • Rows Removed by Filter: 1,591
11.          

SubPlan (for Seq Scan)

12. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=29.27..32.78 rows=1 width=0) (never executed)

  • Hash Cond: (rna.id = av.latest)
13. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=10.17..12.17 rows=200 width=4) (never executed)

  • Group Key: rna.id
14. 0.000 0.000 ↓ 0.0 0

CTE Scan on released_nexus_artifact rna (cost=0.00..9.04 rows=452 width=4) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Hash (cost=19.05..19.05 rows=4 width=4) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on api_version av (cost=4.32..19.05 rows=4 width=4) (never executed)

  • Recheck Cond: (a.id = api_id)
17. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on api_version_api_id_index (cost=0.00..4.32 rows=4 width=0) (never executed)

  • Index Cond: (api_id = a.id)
18. 1.873 107.488 ↑ 2.7 410 1

Hash Join (cost=14.67..585.37 rows=1,115 width=4) (actual time=103.681..107.488 rows=410 loops=1)

  • Hash Cond: (av_1.latest = rna_1.id)
19. 2.124 2.124 ↑ 1.0 18,006 1

Seq Scan on api_version av_1 (cost=0.00..510.62 rows=18,162 width=8) (actual time=0.007..2.124 rows=18,006 loops=1)

20. 0.372 103.491 ↓ 14.3 2,851 1

Hash (cost=12.17..12.17 rows=200 width=4) (actual time=103.491..103.491 rows=2,851 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 133kB
21. 1.572 103.119 ↓ 14.3 2,851 1

HashAggregate (cost=10.17..12.17 rows=200 width=4) (actual time=102.625..103.119 rows=2,851 loops=1)

  • Group Key: rna_1.id
22. 101.547 101.547 ↓ 6.3 2,851 1

CTE Scan on released_nexus_artifact rna_1 (cost=0.00..9.04 rows=452 width=4) (actual time=0.138..101.547 rows=2,851 loops=1)

Planning time : 1.395 ms
Execution time : 108.912 ms