Insert performance question about OCL

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
toucHero
Posts: 2
Joined: Wed 15 Sep 2010 06:39

Insert performance question about OCL

Post by toucHero » Wed 15 Sep 2010 10:15

Hi, i am trying to use your ocl library to build a personalized library. Now, i meet a question, how can i imporve the insert speed.

my code structure is:

oracommand insertcmd;
insertcmd.setSQL(insertsql);
insertcmd.prepare();
for(...)
{
insertcmd["column1"]=1;
insertcmd["column2'].assign(string); //string length=512bytes
insertcmd.execute()
}
insertcmd.unprepare();


with this structure, i can only insert about 100 to 200 rows of data to db (from empty with increamental primary key and indexed column1). Can i improve the speed of insert to 1000/s?

Environment is Linux+Oracle 11g

I am looking forward to your reply.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 28 Sep 2010 12:05

Hello,

Please see the DmlArray demo project ( ..\ocl\demos\dmlarray\ ) and the Loader demo project ( ..\ocl\demos\loader\ ). The DmlArray project may help you if you want to improve the speed of executing identical SQL statements, and the Loader project may help you if you want to improve the speed of inserts.

Post Reply