I need to process records from a table and need to log the outcome of processing of each record. One can pass a datatable to a stored procedure instead to insert all of them by using ADO.NET SqlDbType.Structured (more info here). I need to build that datatable and then pass to the stored procedure. Would this approach still optimal with more that 12k rows (for the datatable) inside a Windows service? I am afraid this might consume too much memory on the server? Not sure If I can build the datatable in batches and pass them to the stored procedure in this scenario.
< 强度 > EDIT 强度 > : - 在这12K行中, 每行没有巨大的浮标。 每行中将使用 guid (Id) 、 status (status) 和 string (ermorMessage, 如果有的话) 。
任何建议或建议都会有所帮助。