Skip to content

Instantly share code, notes, and snippets.

@lfittl
Created September 3, 2009 10:16
Show Gist options
  • Select an option

  • Save lfittl/180224 to your computer and use it in GitHub Desktop.

Select an option

Save lfittl/180224 to your computer and use it in GitHub Desktop.
Limit (cost=14447.11..14447.21 rows=40 width=16) (actual time=3.157..3.173 rows=40 loops=1)
-> Sort (cost=14447.11..14456.04 rows=3573 width=16) (actual time=3.155..3.163 rows=40 loops=1)
Sort Key: created_at, id
Sort Method: top-N heapsort Memory: 26kB
-> Bitmap Heap Scan on posts (cost=619.31..14334.17 rows=3573 width=16) (actual time=1.325..2.573 rows=776 loops=1)
Recheck Cond: (blog_id = ANY ('{134368,136333,136043,134837,144282,142198,134939,140991,134222,134158,142307,142012,142154,140746,140586,137319,138615,140870,138400,140353,134166,140437,138984,139962,139804,136704,134196,138305,135312,137821,136401,138154,135297,138358,135028,137449,134756,135892,138312,134105,135529,137476,137521,136381,136005,134700,134288,134263,136394,135117,134938,137192,134630,136807,136787,135505,136589,134209,135420,135010,134165,134541,135575,135987,134243,136687,134220,134225,134219,134267,134283,135877,134951,134955,135315,134163,134237,134320,134890,134119,136390,136406,134128,136332,135851,134162,134112,134124,136379,136359,134109,134156,135989,134239,136229,135278,136393,134327,136403,136342,134136,136395,134968,134134,136405,136188,134922,134101,135030,134104,134576,134121,134157,135216,123374,136106,136398,134103,136203,136337,134223,136385,134125,134145,134164,134221,134153,134111,135890,134117,134632,136162,134893,134204,134144,134214,134991,134206,134224,134147,134228,134118}'::bigint[]))
-> Bitmap Index Scan on posts_blog_id (cost=0.00..618.42 rows=3573 width=0) (actual time=1.101..1.101 rows=779 loops=1)
Index Cond: (blog_id = ANY ('{134368,136333,136043,134837,144282,142198,134939,140991,134222,134158,142307,142012,142154,140746,140586,137319,138615,140870,138400,140353,134166,140437,138984,139962,139804,136704,134196,138305,135312,137821,136401,138154,135297,138358,135028,137449,134756,135892,138312,134105,135529,137476,137521,136381,136005,134700,134288,134263,136394,135117,134938,137192,134630,136807,136787,135505,136589,134209,135420,135010,134165,134541,135575,135987,134243,136687,134220,134225,134219,134267,134283,135877,134951,134955,135315,134163,134237,134320,134890,134119,136390,136406,134128,136332,135851,134162,134112,134124,136379,136359,134109,134156,135989,134239,136229,135278,136393,134327,136403,136342,134136,136395,134968,134134,136405,136188,134922,134101,135030,134104,134576,134121,134157,135216,123374,136106,136398,134103,136203,136337,134223,136385,134125,134145,134164,134221,134153,134111,135890,134117,134632,136162,134893,134204,134144,134214,134991,134206,134224,134147,134228,134118}'::bigint[]))
SELECT posts.id FROM posts WHERE posts.blog_id IN (134368,136333,136043,134837,144282,142198,134939,140991,134222,134158,142307,142012,142154,140746,140586,137319,138615,140870,138400,140353,134166,140437,138984,139962,139804,136704,134196,138305,135312,137821,136401,138154,135297,138358,135028,137449,134756,135892,138312,134105,135529,137476,137521,136381,136005,134700,134288,134263,136394,135117,134938,137192,134630,136807,136787,135505,136589,134209,135420,135010,134165,134541,135575,135987,134243,136687,134220,134225,134219,134267,134283,135877,134951,134955,135315,134163,134237,134320,134890,134119,136390,136406,134128,136332,135851,134162,134112,134124,136379,136359,134109,134156,135989,134239,136229,135278,136393,134327,136403,136342,134136,136395,134968,134134,136405,136188,134922,134101,135030,134104,134576,134121,134157,135216,123374,136106,136398,134103,136203,136337,134223,136385,134125,134145,134164,134221,134153,134111,135890,134117,134632,136162,134893,134204,134144,134214,134991,134206,134224,134147,134228,134118) ORDER BY posts.created_at DESC, posts.id DESC LIMIT 40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment