explain.depesz.com

PostgreSQL's explain analyze made readable

Result: v6xm

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 10.475 ↑ 1.0 50 1

Limit (cost=19,355.06..19,355.19 rows=50 width=1,205) (actual time=10.447..10.475 rows=50 loops=1)

2. 1.279 10.456 ↑ 30.0 50 1

Sort (cost=19,355.06..19,358.81 rows=1,500 width=1,205) (actual time=10.445..10.456 rows=50 loops=1)

  • Sort Key: images.date_uploaded
  • Sort Method: top-N heapsort Memory: 51kB
3. 0.813 9.177 ↑ 1.1 1,395 1

Nested Loop (cost=0.99..19,305.23 rows=1,500 width=1,205) (actual time=0.084..9.177 rows=1,395 loops=1)

4. 0.534 0.534 ↑ 1.0 30 1

Seq Scan on user_groups ug (cost=0.00..119.75 rows=30 width=4) (actual time=0.044..0.534 rows=30 loops=1)

  • Filter: (group_id = 967)
  • Rows Removed by Filter: 6630
5. 0.630 7.830 ↑ 1.1 46 30

Limit (cost=0.99..638.52 rows=50 width=1,205) (actual time=0.024..0.261 rows=46 loops=30)

6. 1.770 7.200 ↑ 4.2 46 30

Nested Loop (cost=0.99..2,436.33 rows=191 width=1,205) (actual time=0.023..0.240 rows=46 loops=30)

7. 2.640 2.640 ↑ 4.3 46 30

Index Scan Backward using "creator_date_uploaded_Where_pub_not_del" on images (cost=0.56..778.17 rows=196 width=696) (actual time=0.018..0.088 rows=46 loops=30)

  • Index Cond: ((creator_id = ug.user_id) AND ((creator_type)::text = 'User'::text) AND (status = 2))
8. 2.790 2.790 ↑ 1.0 1 1,395

Index Scan using locations_pkey on locations (cost=0.43..8.45 rows=1 width=509) (actual time=0.002..0.002 rows=1 loops=1,395)

  • Index Cond: (id = images.location_id)
  • Filter: active