Laravel雄辩的Updateorcreate不插入大型阵列(超过3000行)
我正在尝试将大量信息加载到一个列中的数据库中。 当我加载一个超过3000个键的数组时,我不会在数据库中获得一行,甚至没有创建。如果数据较少,那么一切都很好。
db配置: db = oracle 16; 列插入类型= clob;内存=无限;
controller.php
$ModelData>addData(id, $result_array);
modeldata
$result_array = collect($result_array);
$array_collect = collect();
foreach ($result_array as $item){
$array_collect ->push($item);
}
$this->updateOrCreate(['id_dataset' => $id,], ['data' => $array_collect->toJson()]);
也许先创建一个新的行,然后进行更新
I am trying to load a large amount of information into a database in one column.
When I load an array of more than 3000 keys, I don't get a row in the DB, it's not even created. If there is less data, then everything is fine.
DB config :
DB = Oracle 16;
column inserted type = CLOB; memory = unlimit;
Controller.php
$ModelData>addData(id, $result_array);
ModelData
$result_array = collect($result_array);
$array_collect = collect();
foreach ($result_array as $item){
$array_collect ->push($item);
}
$this->updateOrCreate(['id_dataset' => $id,], ['data' => $array_collect->toJson()]);
maybe create a new row first, and then do an update
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论