mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
sort insert columns for better cache hits
This commit is contained in:
parent
199c0bb338
commit
9951af0289
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ module ActiveRecord
|
|||
|
||||
conn = @klass.connection
|
||||
|
||||
substitutes = values.to_a
|
||||
substitutes = values.sort_by { |arel_attr,_| arel_attr.name }
|
||||
binds = substitutes.map do |arel_attr, value|
|
||||
[@klass.columns_hash[arel_attr.name], value]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue