作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我认为大约 36,000 只是为了安全起见,我认为这个数字对于像 mysql 这样的现代 sql 数据库来说不会太大。每条记录只有两个属性。
所以我这样做:所以我将它们收集到一个插入语句中
sql = "INSERT INTO tasks (attrib_a, attrib_b) VALUES (c1,d1),(c2,d2),(c3,d3)...(c36000,d36000);"
ActiveRecord::Base.connection.execute sql
from C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
from C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute_without_analyzer
from c:/r/projects/vendor/plugins/rails-footnotes/lib/rails-footnotes/notes/queries_note.rb:130:in `execute'
from C:/Ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
from c:/r/projects/vendor/plugins/rails-footnotes/lib/rails-footnotes/notes/queries_note.rb:130:in `execute'
from (irb):53
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb:242
我不知道上面的信息是否足够,请问我这里没有提供的任何内容。那么知道这是关于什么的吗?
谢谢!!!!
最佳答案
问题是因为超时。我在使用 doctrine ORM 时遇到了同样的问题。在 php 中,我们可以通过更改 php.ini 文件中的脚本时间来解决这个问题。但我不知道如何更改 rails 中的数字。可能有人会帮助你..
关于mysql - rails 大量数据在单次插入 activerecord 中发出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2846874/
当用户在 uisearchbar 中键入文本时,我正在过滤一个数组,但问题是我有一个警报处理程序,每次调用委托(delegate)时都会触发该处理程序,但我希望警报出现只有一次没有多次......代码
我有一个 HTML5、jQuery 卡片内存游戏,您可以通过一次翻转两张卡片来匹配卡片。我想在两张卡片匹配时播放动画,但因为我已经将 "transform: rotationY(180deg)" 应用
在我的 Jboss-EAP-6.1 中,我部署了一个名为 'myRealWebApp.war' 的 .war我可以使用此网址访问我的应用程序 - http://mywebsite.com/myReal
我是一名优秀的程序员,十分优秀!