explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3XBW

Settings
# exclusive inclusive rows x rows loops node
1. 0.097 31.132 ↑ 1.0 6 1

Unique (cost=1,990.96..1,990.99 rows=6 width=8) (actual time=30.951..31.132 rows=6 loops=1)

2. 0.577 31.035 ↓ 239.2 1,435 1

Sort (cost=1,990.96..1,990.97 rows=6 width=8) (actual time=30.950..31.035 rows=1,435 loops=1)

  • Sort Key: lfg.location_id
  • Sort Method: quicksort Memory: 93kB
3. 0.267 30.458 ↓ 239.2 1,435 1

Nested Loop Left Join (cost=2.27..1,990.88 rows=6 width=8) (actual time=0.284..30.458 rows=1,435 loops=1)

4. 0.231 23.016 ↓ 239.2 1,435 1

Nested Loop (cost=1.71..1,975.32 rows=6 width=8) (actual time=0.257..23.016 rows=1,435 loops=1)

5. 0.091 0.091 ↑ 1.0 1 1

Index Only Scan using i_au_id_del on app_user au (cost=0.42..1.44 rows=1 width=8) (actual time=0.090..0.091 rows=1 loops=1)

  • Index Cond: (id = 3397025)
  • Heap Fetches: 0
6. 1.353 22.694 ↓ 239.2 1,435 1

Nested Loop (cost=1.28..1,973.82 rows=6 width=16) (actual time=0.165..22.694 rows=1,435 loops=1)

7. 1.400 17.909 ↓ 50.5 1,716 1

Nested Loop (cost=1.00..1,895.89 rows=34 width=24) (actual time=0.110..17.909 rows=1,716 loops=1)

8. 2.477 2.477 ↓ 2.8 1,754 1

Index Scan using user_loc_user_id_all_index on user_location ul (cost=0.43..257.43 rows=632 width=16) (actual time=0.047..2.477 rows=1,754 loops=1)

  • Index Cond: (user_id = 3397025)
9. 14.032 14.032 ↑ 1.0 1 1,754

Index Scan using idx_loc_flag_del on location_flag lf (cost=0.56..2.58 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=1,754)

  • Index Cond: ((location_id = ul.location_id) AND (flag_id = 14))
  • Filter: (value = 'Yes'::text)
  • Rows Removed by Filter: 0
10. 3.432 3.432 ↑ 1.0 1 1,716

Index Only Scan using idx_location_id_del on location loc (cost=0.29..2.29 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,716)

  • Index Cond: (id = lf.location_id)
  • Heap Fetches: 1435
11. 7.175 7.175 ↓ 0.0 0 1,435

Index Scan using idx_loc_flag_del on location_flag lfg (cost=0.56..2.58 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=1,435)

  • Index Cond: ((location_id = lf.location_id) AND (flag_id = 300))
  • Filter: (value = 'No'::text)
  • Rows Removed by Filter: 1