Skip to content

Instantly share code, notes, and snippets.

@jchen123
Created June 3, 2013 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchen123/5696615 to your computer and use it in GitHub Desktop.
Save jchen123/5696615 to your computer and use it in GitHub Desktop.
bad analyze
"Nested Loop Left Join (cost=0.00..68319.25 rows=523 width=29) (actual time=30.744..283.629 rows=3648 loops=1)"
" -> Nested Loop (cost=0.00..64218.45 rows=523 width=12) (actual time=30.736..274.287 rows=3648 loops=1)"
" -> Index Only Scan using albums_pkey on albums (cost=0.00..8.27 rows=1 width=4) (actual time=0.013..0.016 rows=1 loops=1)"
" Index Cond: (id = 1060)"
" Heap Fetches: 1"
" -> Nested Loop (cost=0.00..64204.95 rows=523 width=12) (actual time=30.722..273.716 rows=3648 loops=1)"
" -> Seq Scan on album_photos (cost=0.00..59111.40 rows=611 width=8) (actual time=30.698..259.694 rows=3924 loops=1)"
" Filter: (album_id = 1060)"
" Rows Removed by Filter: 2254428"
" -> Index Scan using photos_pkey on photos (cost=0.00..8.33 rows=1 width=8) (actual time=0.003..0.003 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: 283.886 ms"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment