explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Z3nl

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 34,851.353 ↑ 1.0 50 1

Limit (cost=6,591.44..6,591.56 rows=50 width=696) (actual time=34,851.322..34,851.353 rows=50 loops=1)

2. 90.483 34,851.332 ↑ 11.5 50 1

Sort (cost=6,591.44..6,592.88 rows=575 width=696) (actual time=34,851.320..34,851.332 rows=50 loops=1)

  • Sort Key: images.date_uploaded
  • Sort Method: top-N heapsort Memory: 50kB
3. 79.029 34,760.849 ↓ 138.7 79,756 1

Nested Loop (cost=1.70..6,572.34 rows=575 width=696) (actual time=3.318..34,760.849 rows=79,756 loops=1)

4. 52.019 32,847.041 ↓ 135.4 79,773 1

Nested Loop (cost=1.27..2,164.67 rows=589 width=696) (actual time=2.852..32,847.041 rows=79,773 loops=1)

5. 0.001 3.858 ↓ 2.3 7 1

Nested Loop (cost=0.70..74.74 rows=3 width=8) (actual time=0.195..3.858 rows=7 loops=1)

6. 0.192 0.192 ↑ 1.0 1 1

Seq Scan on groups (cost=0.00..43.61 rows=1 width=4) (actual time=0.167..0.192 rows=1 loops=1)

  • Filter: (id = 14)
  • Rows Removed by Filter: 1819
7. 0.023 3.665 ↓ 2.3 7 1

Nested Loop (cost=0.70..31.10 rows=3 width=12) (actual time=0.027..3.665 rows=7 loops=1)

8. 0.450 0.450 ↓ 2.3 7 1

Index Only Scan using index_user_groups_on_group_id_and_user_id on user_groups (cost=0.28..13.75 rows=3 width=8) (actual time=0.015..0.450 rows=7 loops=1)

  • Index Cond: (group_id = 14)
  • Heap Fetches: 7
9. 3.192 3.192 ↑ 1.0 1 7

Index Only Scan using users_pkey on users (cost=0.42..5.77 rows=1 width=4) (actual time=0.394..0.456 rows=1 loops=7)

  • Index Cond: (id = user_groups.user_id)
  • Heap Fetches: 2
10. 32,791.164 32,791.164 ↓ 58.1 11,396 7

Index Scan using "creator_date_uploaded_Where_pub_not_del" on images (cost=0.56..694.68 rows=196 width=696) (actual time=1.927..4,684.452 rows=11,396 loops=7)

  • Index Cond: ((creator_id = users.id) AND ((creator_type)::text = 'User'::text) AND (status = 2))
11. 1,834.779 1,834.779 ↑ 1.0 1 79,773

Index Scan using locations_pkey on locations (cost=0.43..7.47 rows=1 width=4) (actual time=0.022..0.023 rows=1 loops=79,773)

  • Index Cond: (id = images.location_id)
  • Filter: active
  • Rows Removed by Filter: 0