Skip to content

Instantly share code, notes, and snippets.

@jchen123
Last active December 18, 2015 00:28
Show Gist options
  • Save jchen123/5696309 to your computer and use it in GitHub Desktop.
Save jchen123/5696309 to your computer and use it in GitHub Desktop.
explain analyze result
"Nested Loop Left Join (cost=13.23..11398.05 rows=523 width=29) (actual time=2.111..32.453 rows=3648 loops=1)"
" -> Nested Loop (cost=13.23..7297.25 rows=523 width=12) (actual time=2.101..21.872 rows=3648 loops=1)"
" -> Index Only Scan using albums_pkey on albums (cost=0.00..8.27 rows=1 width=4) (actual time=0.048..0.049 rows=1 loops=1)"
" Index Cond: (id = 1060)"
" Heap Fetches: 1"
" -> Nested Loop (cost=13.23..7283.75 rows=523 width=12) (actual time=2.045..21.312 rows=3648 loops=1)"
" -> Bitmap Heap Scan on album_photos (cost=13.23..2190.20 rows=611 width=8) (actual time=2.019..4.724 rows=3924 loops=1)"
" Recheck Cond: (album_id = 1060)"
" -> Bitmap Index Scan on index_album_photos_on_album_id_and_photo_id (cost=0.00..13.08 rows=611 width=0) (actual time=1.923..1.923 rows=3924 loops=1)"
" Index Cond: (album_id = 1060)"
" -> Index Scan using photos_pkey on photos (cost=0.00..8.33 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=3924)"
" Index Cond: (id = album_photos.photo_id)"
" Filter: (dead IS NOT TRUE)"
" Rows Removed by Filter: 0"
" -> Index Scan using connected_users_pkey on connected_users (cost=0.00..7.83 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=3648)"
" Index Cond: (photos.connected_user_id = id)"
"Total runtime: 32.927 ms"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment