activerecord-session_store
activerecord-session_store copied to clipboard
Retrieve session without any implicit ordering
Why do you want this change to be made?
Because take does not require to make order in select. Order is very long operation for some kind of tables. And really we don't want to get FIRST record, just any suitable.
ActiveRecord by default first translates as 'order by id'. But type of ID record you this table may be unorderable at all (UUID for example)
https://andycroll.com/ruby/first-and-last-may-not-mean-what-you-think/
Why do you want this change to be made?
In some cases default ordering is not possible and it causes an exception