BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Performance issue with oraoledb & Tadocommand

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
pilmart
Guest





PostPosted: Tue Apr 24, 2007 1:46 pm    Post subject: Performance issue with oraoledb & Tadocommand Reply with quote



Hi There

Am currently using D5 & ado to insert large volumes of data into
an Oracle 10g db.

I'm using a connection string based on an OraOLEDB.Oracle oledb based connection and a parameterised TADOCommand to insert the data, each call to the insert requires 35 param values to be updated.

My process is simple delete the record (based on PK) again using parameterised TADOCommand with PK as the param, on completion insert the new record.

Sounds easy...but the performance is horrible, 8000 recs takes about 15mins, is this realistic or am I doing something blindly dumb.

I have not attempted to tune anything as yet some eveything is pretty much default.

Any help appreciated.
Back to top
Karol Bieniaszewski
Guest





PostPosted: Tue Apr 24, 2007 6:25 pm    Post subject: Re: Performance issue with oraoledb & Tadocommand Reply with quote



Użytkownik "pilmart" <martin.scullion (AT) capgemini (DOT) com> napisał w wiadomości
news:462dc3dd$1 (AT) newsgroups (DOT) borland.com...
Quote:

Hi There

Am currently using D5 & ado to insert large volumes of data into
an Oracle 10g db.

I'm using a connection string based on an OraOLEDB.Oracle oledb based
connection and a parameterised TADOCommand to insert the data, each call
to the insert requires 35 param values to be updated.

My process is simple delete the record (based on PK) again using
parameterised TADOCommand with PK as the param, on completion insert the
new record.

Sounds easy...but the performance is horrible, 8000 recs takes about
15mins, is this realistic or am I doing something blindly dumb.

I have not attempted to tune anything as yet some eveything is pretty much
default.

Any help appreciated.

do you realy need params when you insert data?

Karol Bieniaszewski
Back to top
pilmart
Guest





PostPosted: Wed Apr 25, 2007 8:11 am    Post subject: Performance issue Reply with quote



"Karol Bieniaszewski" <liviuslivius (AT) poczta (DOT) onet.pl> wrote:
Quote:

Użytkownik "pilmart" <martin.scullion (AT) capgemini (DOT) com> napisał w wiadomości
news:462dc3dd$1 (AT) newsgroups (DOT) borland.com...

Hi There

Am currently using D5 & ado to insert large volumes of data into
an Oracle 10g db.

I'm using a connection string based on an OraOLEDB.Oracle oledb based
connection and a parameterised TADOCommand to insert the data, each call
to the insert requires 35 param values to be updated.

My process is simple delete the record (based on PK) again using
parameterised TADOCommand with PK as the param, on completion insert the
new record.

Sounds easy...but the performance is horrible, 8000 recs takes about
15mins, is this realistic or am I doing something blindly dumb.

I have not attempted to tune anything as yet some eveything is pretty much
default.

Any help appreciated.

do you realy need params when you insert data?

Karol Bieniaszewski


Not quite sure what you mean, I have a TADOCommand with parameterised sql in the commandtext propert therefore I have to provide parameters to go into the SQL.


I could just create a string and use format function to insert the values in %s, %d type placeholders, what other way would I do this ?? and it still doesn't explain the performance issue
Back to top
Vitali Kalinin
Guest





PostPosted: Wed Apr 25, 2007 1:25 pm    Post subject: Re: Performance issue with oraoledb & Tadocommand Reply with quote

1. Do you issue 2 commands one for delete and other for insert?

2. If answer on #1 is yes then do you use same ADOCommand and swap its
commandtext each time?

3. Do you append blob values?



Anyway performance is really horrible so I would take a look at server side
problems like - corrupted or not used indexes, inefficient triggers e.t.c.
Back to top
pilmart
Guest





PostPosted: Wed Apr 25, 2007 3:15 pm    Post subject: Performance Reply with quote

"Vitali Kalinin" <vitkalinin (AT) yahoo (DOT) com> wrote:
Quote:
1. Do you issue 2 commands one for delete and other for insert?

2. If answer on #1 is yes then do you use same ADOCommand and swap its
commandtext each time?

3. Do you append blob values?



Anyway performance is really horrible so I would take a look at server side
problems like - corrupted or not used indexes, inefficient triggers e.t.c.


No I use 2 individual Command object 1 for delete 1 for insert, I have now written an oracle procedure and that seems slow as well
Back to top
Vitali Kalinin
Guest





PostPosted: Wed Apr 25, 2007 4:39 pm    Post subject: Re: Performance Reply with quote

So probably this is server side issue
Back to top
Dmitry Arefiev
Guest





PostPosted: Thu Apr 26, 2007 8:11 am    Post subject: Re: Performance issue with oraoledb & Tadocommand Reply with quote

Hello

You are using approach step-by-step. Or how Thomas Kyte
calls it slow-by-slow. Oracle offers many great performance
features, allowing to perform your task many times faster.

1) Do you really need to transmit all parameter values from client ?
If not, then write PL/SQL procedure. And let it do all work on
server side.

2) If you really need to transmit values from client, then ...
.... then you should change your data access components to
more appropriate to your task Smile Any one supporting Array
DML operation / PL/SQL tables will be good choice. For
example, AnyDAC.

Regards,
Dmitry

--
Dmitry Arefiev - www.da-soft.com
AnyDAC - Oracle, MySQL, MSSQL, MSAccess, IBM DB2, Sybase
ASA, DbExpress, ODBC freeware data access framework
ThinDAC - mtier data access engine
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.