explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lw6l

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 268,777.867 ↑ 1.0 100 1

Limit (cost=51,720.87..51,721.12 rows=100 width=200) (actual time=268,777.848..268,777.867 rows=100 loops=1)

2. 16,053.460 268,777.852 ↑ 482.6 100 1

Sort (cost=51,720.87..51,841.51 rows=48,256 width=200) (actual time=268,777.847..268,777.852 rows=100 loops=1)

  • Sort Key: tb.start_date DESC
  • Sort Method: top-N heapsort Memory: 76kB
3. 17,895.589 252,724.392 ↓ 868.2 41,896,886 1

Nested Loop (cost=124.49..49,876.56 rows=48,256 width=200) (actual time=5.920..252,724.392 rows=41,896,886 loops=1)

4. 0.669 4.553 ↓ 172.5 345 1

Unique (cost=123.92..123.93 rows=2 width=8) (actual time=3.344..4.553 rows=345 loops=1)

5. 0.626 3.884 ↓ 172.5 345 1

Sort (cost=123.92..123.93 rows=2 width=8) (actual time=3.343..3.884 rows=345 loops=1)

  • Sort Key: ul.location_id
  • Sort Method: quicksort Memory: 41kB
6. 0.015 3.258 ↓ 172.5 345 1

Nested Loop (cost=0.99..123.91 rows=2 width=8) (actual time=0.049..3.258 rows=345 loops=1)

7. 0.427 0.427 ↓ 9.3 352 1

Index Scan using user_loc_user_id on user_location ul (cost=0.42..17.80 rows=38 width=8) (actual time=0.025..0.427 rows=352 loops=1)

  • Index Cond: (user_id = 3397025)
8. 2.816 2.816 ↑ 1.0 1 352

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

  • Index Cond: ((location_id = ul.location_id) AND (flag_id = 14))
  • Filter: (value = 'Yes'::text)
  • Rows Removed by Filter: 0
9. 234,824.250 234,824.250 ↓ 5.0 121,440 345

Index Scan using i_timeblock_loc on timeblock tb (cost=0.57..24,635.02 rows=24,128 width=200) (actual time=0.157..680.650 rows=121,440 loops=345)

  • Index Cond: (location_id = ul.location_id)
Planning time : 0.891 ms