TORaTable slow on updates and inserts
Posted: Fri 23 Jan 2009 14:56
I have created some simple loops in which I add 10K records using a transaction and without a transaction.
This I do with NexusDB (My current DB engine)
and Oracle using ODAC
We mean to implement oracle as an alternative to NexusDB because one of our customers insists out application data is stored using oracle.
So I am evaluating several possibilities to make my delphi app communicate with oracle. One of them is Devart ODAC.
Locate and scan of TOratable are fast enough. But insert/post and edit/post are way to slow. I have added a key field, and set the keyfield property accodingly. but no luck.
Below is some output of my testapp.
Since the difference between NexusDB inserts/edits and ODAC Edits/Inserts is so big, I guess I have missed something. Please put me on the right track for fixing this.
UPDATE 20090126
Finally managed to connect using OCI mode. But this does not change performance. (I didn't really expect it to make a big difference)
Regards
Hans
//\//\//\//\//\ SELECT ENGINE //\//\//\//\//\
TdmNexusDB selected
//\//\//\//\//\ CONNECT //\//\//\//\//\
//\//\//\//\//\ DROP TABLES //\//\//\//\//\
Found 4 tables in TdmNexusDB
Dropped UserGroups
Dropped Users
Dropped UsrGrpLnk
Dropped TestDataTable
//\//\//\//\//\ CREATE TABLES //\//\//\//\//\
Found 4 definitions in metadata in TdmNexusDB
UserGroups created
Users created
UsrGrpLnk created
TestDataTable created
//\//\//\//\//\ FILL TABLES //\//\//\//\//\
Created 10000 GUIDs in 31 ms
Added 10000 records in 672 ms
START TRANSACTION
Appended 10000 records in 140 ms
TRANSACTION COMITTED 10000 records 16 ms
Added 10000 records in 156 ms
//\//\//\//\//\ SCAN TABLES //\//\//\//\//\
sequential scan 20000 records took 94 ms
//\//\//\//\//\ LOCATE TEST //\//\//\//\//\
random locate 10000 records took 110 ms. Misses: 0
//\//\//\//\//\ RANDOM EDIT //\//\//\//\//\
random locate/edit 10000 records took 515 ms. Misses: 0
//\//\//\//\//\ DISCONNECT //\//\//\//\//\
//\//\//\//\//\ SELECT ENGINE //\//\//\//\//\
TdmODAC selected
//\//\//\//\//\ CONNECT //\//\//\//\//\
//\//\//\//\//\ DROP TABLES //\//\//\//\//\
Found 13 tables in TdmODAC
Dropped UserGroups
Dropped Users
Dropped UsrGrpLnk
Dropped TestDataTable
//\//\//\//\//\ CREATE TABLES //\//\//\//\//\
Found 4 definitions in metadata in TdmODAC
UserGroups created
Users created
UsrGrpLnk created
TestDataTable created
//\//\//\//\//\ FILL TABLES //\//\//\//\//\
Created 10000 GUIDs in 15 ms
Added 10000 records in 17516 ms
START TRANSACTION
Appended 10000 records in 78406 ms
TRANSACTION COMITTED 10000 records 0 ms
Added 10000 records in 78406 ms
//\//\//\//\//\ RANDOM EDIT //\//\//\//\//\
random locate/edit 10000 records took 317734 ms. Misses: 0
This I do with NexusDB (My current DB engine)
and Oracle using ODAC
We mean to implement oracle as an alternative to NexusDB because one of our customers insists out application data is stored using oracle.
So I am evaluating several possibilities to make my delphi app communicate with oracle. One of them is Devart ODAC.
Locate and scan of TOratable are fast enough. But insert/post and edit/post are way to slow. I have added a key field, and set the keyfield property accodingly. but no luck.
Below is some output of my testapp.
Since the difference between NexusDB inserts/edits and ODAC Edits/Inserts is so big, I guess I have missed something. Please put me on the right track for fixing this.
UPDATE 20090126
Finally managed to connect using OCI mode. But this does not change performance. (I didn't really expect it to make a big difference)
Regards
Hans
//\//\//\//\//\ SELECT ENGINE //\//\//\//\//\
TdmNexusDB selected
//\//\//\//\//\ CONNECT //\//\//\//\//\
//\//\//\//\//\ DROP TABLES //\//\//\//\//\
Found 4 tables in TdmNexusDB
Dropped UserGroups
Dropped Users
Dropped UsrGrpLnk
Dropped TestDataTable
//\//\//\//\//\ CREATE TABLES //\//\//\//\//\
Found 4 definitions in metadata in TdmNexusDB
UserGroups created
Users created
UsrGrpLnk created
TestDataTable created
//\//\//\//\//\ FILL TABLES //\//\//\//\//\
Created 10000 GUIDs in 31 ms
Added 10000 records in 672 ms
START TRANSACTION
Appended 10000 records in 140 ms
TRANSACTION COMITTED 10000 records 16 ms
Added 10000 records in 156 ms
//\//\//\//\//\ SCAN TABLES //\//\//\//\//\
sequential scan 20000 records took 94 ms
//\//\//\//\//\ LOCATE TEST //\//\//\//\//\
random locate 10000 records took 110 ms. Misses: 0
//\//\//\//\//\ RANDOM EDIT //\//\//\//\//\
random locate/edit 10000 records took 515 ms. Misses: 0
//\//\//\//\//\ DISCONNECT //\//\//\//\//\
//\//\//\//\//\ SELECT ENGINE //\//\//\//\//\
TdmODAC selected
//\//\//\//\//\ CONNECT //\//\//\//\//\
//\//\//\//\//\ DROP TABLES //\//\//\//\//\
Found 13 tables in TdmODAC
Dropped UserGroups
Dropped Users
Dropped UsrGrpLnk
Dropped TestDataTable
//\//\//\//\//\ CREATE TABLES //\//\//\//\//\
Found 4 definitions in metadata in TdmODAC
UserGroups created
Users created
UsrGrpLnk created
TestDataTable created
//\//\//\//\//\ FILL TABLES //\//\//\//\//\
Created 10000 GUIDs in 15 ms
Added 10000 records in 17516 ms
START TRANSACTION
Appended 10000 records in 78406 ms
TRANSACTION COMITTED 10000 records 0 ms
Added 10000 records in 78406 ms
//\//\//\//\//\ RANDOM EDIT //\//\//\//\//\
random locate/edit 10000 records took 317734 ms. Misses: 0