order by rand()は数千レコードの時点で遅いらしい/おとなしくクエリ二回発行した方が良さそう

willnetwillnet のブックマーク 2012/02/23 11:39

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Random record in ActiveRecord

    I'm in need of getting a random record from a table via ActiveRecord. I've followed the example from Jamis Buck from 2006. However, I've also come across another way via a Google search (can't attr...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう