Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why a delete all from table slower than the insert?

ddevienneJan 22 2008 — edited Jan 23 2008
I'm testing OCI inserts to a 4 columns table of types NUMBER,BINARY_FLOAT * 3.

With my OCI client and the server (11g) on the same laptop, and using an array-insert in OCI, I insert 1 million rows in less than 2 seconds, yet when I a "delete from point_tab" in SQL*Plus, it takes more time, something like 5 or 6 seconds. (the subsequent commit is almost instantaneous).

I don't understand why the delete, which runs entirely on the server, is slower than the insert which has to transfer the data from client to server (granted, on the same machine).

Any insight would be appreciated, because I'm missing something here. Thanks, --DD
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2008
Added on Jan 22 2008
13 comments
820 views