Skip to content

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