performance - Linq-to-SQL SubmitChanges for single object or all objects: What is faster
问题描述
I have a set of filenames which i want to insert in a SQL Table using Linq to SQL. So i create an entity for each filename and add them to the data context using .InsertOnSubmit(...) After that i am doing SubmitChanges() on the context to push the data into my SQL Table.
The second way could be to run SubmitChanges() after each entity creation and push each entity separately to the data base.
Are there any differences in performance between this two ways? If so, which one is faster?
解决方案
推荐阅读
- react-native - 内置的 react 原生组件是纯的吗?
- javascript - jsPlumb:如何建立条件连接
- python - CVXPY - 传递变量和常量
- windows - 应用程序可以做些什么来阻止 ReadProcessMemory 中的其他进程?
- python-3.x - 将 Numpy 中的张量从 2D 重塑为 3D
- node.js - 将 multipart/form-data 发布到无服务器 Next.js API(在 Vercel / Now.sh 上运行)
- spring - Spring Batch JPA Bulk Insert 在使用 GenerationType.IDENTITY 时会吃掉性能
- arrays - Vue更改数组/对象位置或层次结构
- r - 使用 dplyr left_join 连接表时缺少值
- python - NameError:名称“MNIST”未定义