explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zTd

Settings
# exclusive inclusive rows x rows loops node
1. 0.390 8,006.204 ↓ 52.0 52 1

Nested Loop Anti Join (cost=3.14..113.64 rows=1 width=65) (actual time=1,032.452..8,006.204 rows=52 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, area.name, cty.date_year
  • Buffers: shared hit=846 read=164
2. 0.309 7,570.049 ↓ 27.5 55 1

Nested Loop (cost=2.71..112.75 rows=2 width=69) (actual time=1,010.506..7,570.049 rows=55 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, rg.id, cty.date_year, area.name
  • Buffers: shared hit=686 read=158
3. 0.190 3,655.676 ↓ 24.0 48 1

Nested Loop (cost=2.29..111.76 rows=2 width=71) (actual time=918.077..3,655.676 rows=48 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, rg.id, rel.id, area.name
  • Buffers: shared hit=574 read=74
4. 0.103 1,308.042 ↓ 31.0 62 1

Nested Loop (cost=1.86..110.55 rows=2 width=67) (actual time=688.923..1,308.042 rows=62 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, rg.id, area.name
  • Join Filter: (rg.type = reltype.id)
  • Rows Removed by Join Filter: 248
  • Buffers: shared hit=328 read=27
5. 0.014 0.014 ↑ 1.0 5 1

Seq Scan on musicbrainz.release_group_primary_type reltype (cost=0.00..1.05 rows=5 width=4) (actual time=0.010..0.014 rows=5 loops=1)

  • Output: reltype.id, reltype.name, reltype.parent, reltype.child_order, reltype.description, reltype.gid
  • Buffers: shared hit=1
6. 0.154 1,307.925 ↓ 31.0 62 5

Materialize (cost=1.86..109.35 rows=2 width=71) (actual time=137.781..261.585 rows=62 loops=5)

  • Output: art.gid, art.name, art.begin_date_year, rg.type, rg.id, area.name
  • Buffers: shared hit=327 read=27
7. 0.253 1,307.771 ↓ 31.0 62 1

Nested Loop (cost=1.86..109.34 rows=2 width=71) (actual time=688.895..1,307.771 rows=62 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, rg.type, rg.id, area.name
  • Inner Unique: true
  • Buffers: shared hit=327 read=27
8. 0.283 1,239.876 ↓ 31.0 62 1

Nested Loop (cost=1.43..108.39 rows=2 width=79) (actual time=621.741..1,239.876 rows=62 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, acn.artist_credit, rg.artist_credit, rg.type, rg.id, area.name
  • Buffers: shared hit=81 read=25
9. 0.034 1,142.716 ↓ 5.5 11 1

Nested Loop (cost=1.00..106.44 rows=2 width=67) (actual time=597.232..1,142.716 rows=11 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, acn.artist_credit, area.name
  • Buffers: shared hit=5 read=12
10. 0.010 130.391 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.57..16.73 rows=1 width=67) (actual time=130.389..130.391 rows=1 loops=1)

  • Output: art.gid, art.name, art.begin_date_year, art.id, area.name
  • Inner Unique: true
  • Buffers: shared hit=3 read=2
11. 130.365 130.365 ↑ 1.0 1 1

Index Scan using artist_idx_gid on musicbrainz.artist art (cost=0.43..8.45 rows=1 width=43) (actual time=130.363..130.365 rows=1 loops=1)

  • Output: art.id, art.gid, art.name, art.sort_name, art.begin_date_year, art.begin_date_month, art.begin_date_day, art.end_date_year, art.end_date_month, art.end_date_day, art.type,
  • Index Cond: (art.gid = '66fc5bf8-daa4-4241-b378-9bc9077939d2'::uuid)
  • Buffers: shared hit=2 read=2
12. 0.016 0.016 ↓ 0.0 0 1

Index Scan using area_pkey on musicbrainz.area (cost=0.14..8.16 rows=1 width=36) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: area.id, area.gid, area.name, area.type, area.edits_pending, area.last_updated, area.begin_date_year, area.begin_date_month, area.begin_date_day, area.end_date_year, area.e
  • Index Cond: (area.id = COALESCE(art.begin_area, art.area))
  • Buffers: shared hit=1
13. 1,012.291 1,012.291 ↑ 2.1 11 1

Index Scan using artist_credit_name_idx_artist on musicbrainz.artist_credit_name acn (cost=0.43..89.48 rows=23 width=8) (actual time=466.838..1,012.291 rows=11 loops=1)

  • Output: acn.artist_credit, acn."position", acn.artist, acn.name, acn.join_phrase
  • Index Cond: (acn.artist = art.id)
  • Buffers: shared hit=2 read=10
14. 96.877 96.877 ↑ 2.8 6 11

Index Scan using release_group_idx_artist_credit on musicbrainz.release_group rg (cost=0.43..0.81 rows=17 width=12) (actual time=8.694..8.807 rows=6 loops=11)

  • Output: rg.id, rg.gid, rg.name, rg.artist_credit, rg.type, rg.comment, rg.edits_pending, rg.last_updated
  • Index Cond: (rg.artist_credit = acn.artist_credit)
  • Filter: (rg.type = ANY ('{1,3}'::integer[]))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=76 read=13
15. 67.642 67.642 ↑ 1.0 1 62

Index Only Scan using artist_credit_pkey on musicbrainz.artist_credit cred (cost=0.43..0.48 rows=1 width=4) (actual time=1.091..1.091 rows=1 loops=62)

  • Output: cred.id
  • Index Cond: (cred.id = acn.artist_credit)
  • Heap Fetches: 62
  • Buffers: shared hit=246 read=2
16. 2,347.444 2,347.444 ↑ 2.0 1 62

Index Scan using release_idx_release_group on musicbrainz.release rel (cost=0.43..0.58 rows=2 width=8) (actual time=37.837..37.862 rows=1 loops=62)

  • Output: rel.id, rel.gid, rel.name, rel.artist_credit, rel.release_group, rel.status, rel.packaging, rel.language, rel.script, rel.barcode, rel.comment, rel.edits_pending, rel.quality, rel.last_updated
  • Index Cond: (rel.release_group = rg.id)
  • Filter: (rel.status = 1)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=246 read=47
17. 3,914.064 3,914.064 ↑ 1.0 1 48

Index Scan using release_country_pkey on musicbrainz.release_country cty (cost=0.43..0.48 rows=1 width=6) (actual time=75.672..81.543 rows=1 loops=48)

  • Output: cty.release, cty.country, cty.date_year, cty.date_month, cty.date_day
  • Buffers: shared hit=112 read=84
18. 435.765 435.765 ↓ 0.0 0 55

Index Only Scan using release_group_secondary_type_join_pkey on musicbrainz.release_group_secondary_type_join (cost=0.42..0.44 rows=1 width=4) (actual time=7.923..7.923 rows=0 loops=55)

  • Output: release_group_secondary_type_join.release_group, release_group_secondary_type_join.secondary_type
  • Index Cond: (release_group_secondary_type_join.release_group = rg.id)
  • Heap Fetches: 0
  • Buffers: shared hit=160 read=6