Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve session without any implicit ordering #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dapi
Copy link

@dapi dapi commented Apr 11, 2019

No description provided.

@rafaelfranca
Copy link
Member

Why do you want this change to be made?

@dapi
Copy link
Author

dapi commented Dec 20, 2019

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/

@dapi
Copy link
Author

dapi commented Nov 4, 2021

Why do you want this change to be made?

In some cases default ordering is not possible and it causes an exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants