explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Cxk

Settings
# exclusive inclusive rows x rows loops node
1. 0.294 6,518.351 ↓ 81.0 81 1

Nested Loop Left Join (cost=34.62..174.94 rows=1 width=84) (actual time=86.428..6,518.351 rows=81 loops=1)

2. 0.210 6,517.814 ↓ 81.0 81 1

Nested Loop (cost=34.47..166.66 rows=1 width=60) (actual time=86.403..6,517.814 rows=81 loops=1)

3. 1.049 6,517.199 ↓ 81.0 81 1

Nested Loop (cost=34.34..166.50 rows=1 width=64) (actual time=86.311..6,517.199 rows=81 loops=1)

4. 1.487 2,032.998 ↓ 163.0 326 1

Nested Loop (cost=1.71..101.19 rows=2 width=68) (actual time=24.295..2,032.998 rows=326 loops=1)

5. 1.075 2,025.274 ↓ 115.5 231 1

Nested Loop (cost=1.28..99.11 rows=2 width=47) (actual time=24.226..2,025.274 rows=231 loops=1)

6. 0.277 1.794 ↓ 115.5 231 1

Nested Loop (cost=0.86..98.15 rows=2 width=43) (actual time=0.073..1.794 rows=231 loops=1)

7. 0.048 0.048 ↑ 1.0 1 1

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

  • Index Cond: (gid = '53b106e7-0cc6-42cc-ac95-ed8d30a3a98e'::uuid)
8. 1.469 1.469 ↓ 10.0 231 1

Index Scan using artist_credit_name_idx_artist on artist_credit_name acn (cost=0.43..89.48 rows=23 width=8) (actual time=0.024..1.469 rows=231 loops=1)

  • Index Cond: (artist = art.id)
9. 2,022.405 2,022.405 ↑ 1.0 1 231

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

  • Index Cond: (id = acn.artist_credit)
  • Heap Fetches: 231
10. 6.237 6.237 ↑ 20.0 1 231

Index Scan using release_group_idx_artist_credit on release_group rg (cost=0.43..0.84 rows=20 width=33) (actual time=0.022..0.027 rows=1 loops=231)

  • Index Cond: (artist_credit = cred.id)
11. 0.000 4,483.152 ↓ 0.0 0 326

Subquery Scan on rel (cost=32.63..32.65 rows=1 width=4) (actual time=13.752..13.752 rows=0 loops=326)

  • Filter: (rg.id = rel.rg)
12. 1.304 4,483.152 ↓ 0.0 0 326

Unique (cost=32.63..32.63 rows=1 width=15) (actual time=13.752..13.752 rows=0 loops=326)

13. 5.216 4,481.848 ↓ 0.0 0 326

Sort (cost=32.63..32.63 rows=1 width=15) (actual time=13.748..13.748 rows=0 loops=326)

  • Sort Key: ((cty.country = 222)) DESC, cty.date_year, cty.date_month, cty.date_day
  • Sort Method: quicksort Memory: 25kB
14. 0.796 4,476.632 ↓ 0.0 0 326

Nested Loop (cost=1.71..32.62 rows=1 width=15) (actual time=13.727..13.732 rows=0 loops=326)

15. 0.594 4,473.046 ↓ 0.0 0 326

Nested Loop (cost=1.28..24.16 rows=1 width=8) (actual time=13.720..13.721 rows=0 loops=326)

16. 1.738 4,470.112 ↓ 0.0 0 326

Nested Loop Left Join (cost=0.85..12.90 rows=1 width=4) (actual time=13.712..13.712 rows=0 loops=326)

  • Join Filter: (sec.release_group = _rg.id)
  • Filter: (sec.secondary_type IS NULL)
  • Rows Removed by Filter: 1
17. 4,462.614 4,462.614 ↑ 1.0 1 326

Index Scan using release_group_pkey on release_group _rg (cost=0.43..8.45 rows=1 width=4) (actual time=13.688..13.689 rows=1 loops=326)

  • Index Cond: (id = rg.id)
  • Filter: (type = ANY ('{1,3}'::integer[]))
  • Rows Removed by Filter: 0
18. 5.760 5.760 ↑ 1.0 1 288

Index Only Scan using release_group_secondary_type_join_pkey on release_group_secondary_type_join sec (cost=0.42..4.44 rows=1 width=8) (actual time=0.020..0.020 rows=1 loops=288)

  • Index Cond: (release_group = rg.id)
  • Heap Fetches: 0
19. 2.340 2.340 ↑ 1.0 2 90

Index Scan using release_idx_release_group on release _rel (cost=0.43..11.24 rows=2 width=8) (actual time=0.023..0.026 rows=2 loops=90)

  • Index Cond: (release_group = rg.id)
  • Filter: (status = 1)
  • Rows Removed by Filter: 0
20. 2.790 2.790 ↑ 1.0 1 155

Index Scan using release_country_pkey on release_country cty (cost=0.43..8.45 rows=1 width=14) (actual time=0.018..0.018 rows=1 loops=155)

  • Index Cond: (release = _rel.id)
21. 0.405 0.405 ↑ 1.0 1 81

Index Only Scan using release_group_primary_type_pkey on release_group_primary_type reltype (cost=0.13..0.15 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=81)

  • Index Cond: (id = rg.type)
  • Heap Fetches: 0
22. 0.243 0.243 ↓ 0.0 0 81

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

  • Index Cond: (id = COALESCE(art.begin_area, art.area))
Planning time : 5.471 ms
Execution time : 6,518.648 ms