<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-3069349063312276662.post7506522708974301460..comments</id><updated>2009-10-07T02:25:09.744+02:00</updated><title type='text'>Comments on Insane Terminology: Selecting multiple random rows from table in rails...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://robzon.aenima.pl/feeds/7506522708974301460/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3069349063312276662/7506522708974301460/comments/default'/><link rel='alternate' type='text/html' href='http://robzon.aenima.pl/2008/05/selecting-multiple-random-rows-from.html'/><author><name>Robert Nasiadek</name><uri>http://www.blogger.com/profile/06721470947386818024</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3069349063312276662.post-5319242951541458457</id><published>2009-10-07T00:59:20.136+02:00</published><updated>2009-10-07T00:59:20.136+02:00</updated><title type='text'>even chosen randomly, records would be displayed i...</title><summary type='text'>even chosen randomly, records would be displayed in order. For example random 3 ids from (1..10) would return 3,5,6 or 6,7,8. What would be the efficent way to mix that order ?</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3069349063312276662/7506522708974301460/comments/default/5319242951541458457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3069349063312276662/7506522708974301460/comments/default/5319242951541458457'/><link rel='alternate' type='text/html' href='http://robzon.aenima.pl/2008/05/selecting-multiple-random-rows-from.html?showComment=1254869960136#c5319242951541458457' title=''/><author><name>gRuby</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://robzon.aenima.pl/2008/05/selecting-multiple-random-rows-from.html' ref='tag:blogger.com,1999:blog-3069349063312276662.post-7506522708974301460' source='http://www.blogger.com/feeds/3069349063312276662/posts/default/7506522708974301460' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-3069349063312276662.post-2208227427436631302</id><published>2008-11-03T09:46:00.000+01:00</published><updated>2008-11-03T09:46:00.000+01:00</updated><title type='text'>Not really. If you go like this, the database will...</title><summary type='text'>Not really. If you go like this, the database will first generate random number for EVERY row in the table, then sort by that number and choose n first rows. That's a performance killer.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3069349063312276662/7506522708974301460/comments/default/2208227427436631302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3069349063312276662/7506522708974301460/comments/default/2208227427436631302'/><link rel='alternate' type='text/html' href='http://robzon.aenima.pl/2008/05/selecting-multiple-random-rows-from.html?showComment=1225701960000#c2208227427436631302' title=''/><author><name>Robert Nasiadek</name><uri>http://www.blogger.com/profile/06721470947386818024</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04587250021844024583'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://robzon.aenima.pl/2008/05/selecting-multiple-random-rows-from.html' ref='tag:blogger.com,1999:blog-3069349063312276662.post-7506522708974301460' source='http://www.blogger.com/feeds/3069349063312276662/posts/default/7506522708974301460' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-3069349063312276662.post-4565781502166210031</id><published>2008-11-02T21:37:00.000+01:00</published><updated>2008-11-02T21:37:00.000+01:00</updated><title type='text'>can't you just use :order =&gt; "RAND()", :limit =&gt; n...</title><summary type='text'>can&amp;#39;t you just use :order =&amp;gt; &amp;quot;RAND()&amp;quot;, :limit =&amp;gt; n&lt;BR/&gt;&lt;BR/&gt;(exact syntax will vary by database.)</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3069349063312276662/7506522708974301460/comments/default/4565781502166210031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3069349063312276662/7506522708974301460/comments/default/4565781502166210031'/><link rel='alternate' type='text/html' href='http://robzon.aenima.pl/2008/05/selecting-multiple-random-rows-from.html?showComment=1225658220000#c4565781502166210031' title=''/><author><name>darius</name><uri>http://www.blogger.com/profile/06890701761552832592</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://robzon.aenima.pl/2008/05/selecting-multiple-random-rows-from.html' ref='tag:blogger.com,1999:blog-3069349063312276662.post-7506522708974301460' source='http://www.blogger.com/feeds/3069349063312276662/posts/default/7506522708974301460' type='text/html'/></entry></feed>