On 7/2/06, Josh Susser <[EMAIL PROTECTED]> wrote:

On Jul 2, 2006, at 10:24 AM, Coda Hale wrote:
> This is not particularly friendly behavior, but the buck for this can
> be passed on to the SQL standard: if you want an order, specify an
> order. Otherwise, don't expect anything.
>
> Does this seem like a valid tradeoff to everyone?

I think it's best that way.  Even on DBs that default to order by id,
that order can be less meaningful than you'd expect.  Some approaches
to scaling involve allocating blocks of primary keys to separate DB
servers, so the id order may not correspond to global creation order.

Yeah, that makes sense.

Okay, I've added another patch to the ticket
(http://dev.rubyonrails.org/attachment/ticket/3438/eager_loading_order_patch_sql_standard.diff)
which no longer orders by primary key. It has full coverage with 2
unit tests (152 assertions now), and it passes all existing unit
tests.

I'd like to thank everyone for their input and help in making this
patch a lot stronger and for gently reminding me that MySQL is not the
center of the universe.

--
Coda Hale
http://blog.codahale.com
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to