Skip to content

Instantly share code, notes, and snippets.

@akandratovich
Created July 24, 2012 10:45
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 akandratovich/3169347 to your computer and use it in GitHub Desktop.
Save akandratovich/3169347 to your computer and use it in GitHub Desktop.
"Limit (cost=19359.90..19360.02 rows=50 width=12) (actual time=35.973..36.005 rows=50 loops=1)"
" Output: a.f, a.t, a."time""
" Buffers: shared hit=5238 read=2"
" -> Sort (cost=19359.90..19360.14 rows=96 width=12) (actual time=35.935..35.947 rows=50 loops=1)"
" Output: a.f, a.t, a."time""
" Sort Key: a."time""
" Sort Method: top-N heapsort Memory: 18kB"
" Buffers: shared hit=5238 read=2"
" -> Hash Join (cost=18994.33..19356.74 rows=96 width=12) (actual time=26.953..31.508 rows=7500 loops=1)"
" Output: a.f, a.t, a."time""
" Hash Cond: (c0.t = a.f)"
" Buffers: shared hit=5238 read=2"
" -> Bitmap Heap Scan on public.u2u c0 (cost=5.20..365.91 rows=98 width=4) (actual time=0.143..0.191 rows=100 loops=1)"
" Output: c0.f, c0.t"
" Recheck Cond: (c0.f = 5000)"
" Buffers: shared hit=4 read=1"
" -> Bitmap Index Scan on fki_f_id (cost=0.00..5.17 rows=98 width=0) (actual time=0.058..0.058 rows=100 loops=1)"
" Index Cond: (c0.f = 5000)"
" Buffers: shared hit=3"
" -> Hash (cost=18866.70..18866.70 rows=9794 width=12) (actual time=26.746..26.746 rows=10000 loops=1)"
" Output: a.f, a.t, a."time""
" Buckets: 1024 Batches: 1 Memory Usage: 313kB"
" Buffers: shared hit=5234 read=1"
" -> Nested Loop (cost=5.09..18866.70 rows=9794 width=12) (actual time=0.143..21.056 rows=10000 loops=1)"
" Output: a.f, a.t, a."time""
" Buffers: shared hit=5234 read=1"
" -> Index Scan using fki_f_id on public.u2u c1 (cost=0.00..389.44 rows=98 width=4) (actual time=0.026..0.116 rows=100 loops=1)"
" Output: c1.f, c1.t"
" Index Cond: (c1.f = 5000)"
" Buffers: shared hit=5"
" -> Bitmap Heap Scan on public.m a (cost=5.09..187.31 rows=99 width=12) (actual time=0.026..0.126 rows=100 loops=100)"
" Output: a.f, a.t, a."time""
" Recheck Cond: (a.t = c1.t)"
" Buffers: shared hit=5229 read=1"
" -> Bitmap Index Scan on fki_m_t (cost=0.00..5.06 rows=99 width=0) (actual time=0.018..0.018 rows=100 loops=100)"
" Index Cond: (a.t = c1.t)"
" Buffers: shared hit=327"
"Total runtime: 36.111 ms"
"Limit (cost=5.20..7736.49 rows=50 width=12) (actual time=34433.509..34485.923 rows=50 loops=1)"
" Output: a.f, a.t, a."time""
" Buffers: shared hit=239047 read=2209"
" -> Nested Loop (cost=5.20..1501112.85 rows=9708 width=12) (actual time=34433.507..34485.892 rows=50 loops=1)"
" Output: a.f, a.t, a."time""
" Join Filter: (a.f = c0.t)"
" Buffers: shared hit=239047 read=2209"
" -> Index Scan Backward using time_i on public.m a (cost=0.00..45446.69 rows=990000 width=12) (actual time=0.136..639.472 rows=488201 loops=1)"
" Output: a.f, a.t, a."time""
" Buffers: shared hit=239042 read=2209"
" -> Materialize (cost=5.20..366.40 rows=98 width=4) (actual time=0.000..0.032 rows=100 loops=488201)"
" Output: c0.t"
" Buffers: shared hit=5"
" -> Bitmap Heap Scan on public.u2u c0 (cost=5.20..365.91 rows=98 width=4) (actual time=0.030..0.066 rows=100 loops=1)"
" Output: c0.t"
" Recheck Cond: (c0.f = 5000)"
" Buffers: shared hit=5"
" -> Bitmap Index Scan on fki_f_id (cost=0.00..5.17 rows=98 width=0) (actual time=0.022..0.022 rows=100 loops=1)"
" Index Cond: (c0.f = 5000)"
" Buffers: shared hit=3"
"Total runtime: 34485.986 ms"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment