提交 9951af02 编写于 作者: A Aaron Patterson

sort insert columns for better cache hits

上级 199c0bb3
......@@ -50,7 +50,7 @@ def insert(values)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册