I am trying to insert values in Oracle DB. I have a stored procedure which right now insert one row at a time. But reading more about bulk insert here (http://stackoverflow.com/questions/343299/bulk-insert-to-oracle-using-net, http://dotnetslackers.com/articles/ado_net/BulkOperationsUsingOracleDataProviderForNETODPNET.aspx), it seems like it is better to pass parameter value as an array. I have a generic list something like this i.e. employeeList.
class employee()
{
public int ID {get; set;}
public string Name {get; set;}
}
How can i call my stored pr开发者_如何学Pythonocedure (i know i need to make change with my in parameter in it, to take array of parameter) and pass each parameter value as an array to do bulk insert (trying to follow the example link)?
Even if you pass in an array you still can only do one DML at a time.
If you are wanting bulk loading for speed, write out a file and use SQL Loader bulk insert into your table.
It is the only way to get super fast performance for thousands of rows.
精彩评论