Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Does primary key structure impact UPDATE performance?
We have a process that selects from one table in a cursor loop and
updates two tables within the loop. These two tables are nearly
identical in structure but have different primary keys. The first
table's primary key is on a NUMBER column that is also the first
column in the table. The 2nd table's primary key is a catenation
of 3 columns, VARCHAR2(80), VARCHAR2(30), and a DATE, and these
columns are among the last columns in the table (which has a
total 70 columns.)
>From the 10046 traces, the performance of the update on the first table
is clearly far better then on the 2nd table. Just one update on the
2nd table is taking an average of 2 seconds to complete.
In addition to the primary key differences, the composition of the data
in the first primary key column of the 2nd table is actually a
catenation
of 4 other columns (the data comes from a SAP system), that looks
something like this: '~~500AEI~500ID~43431AWQQE~AA44E~400ID', etc.
So, would this kind of character data, or the way the 2nd table's primary key is structured in comparision to the first table impact update performance?
Thanks!
Email: jeff.thomas_at_thomson.net
Indy DBA Master Documentation available at: http://gkmqp.tce.com/tis_dba
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Sun May 16 2004 - 21:05:05 CDT
![]() |
![]() |