Hi everyone,
Unfortunately we have encountered a really hard to solve issue regarding the performance of updating records in a Oracle database table (for security reasons we can’t use any real table/attribute names).
Context:
We have a workflow that updates a table in our Oracle database on creditor information on a daily basis. The table in Oracle is called “CREDITORS”. The workflow consists of multiple parts, for simplicity: First, the workflow pulls data via API call (download tool) from the source system, lets call this SOURCE. Second, we call the records that are currently valid (have a datestamp of the year “8888”) from the table “CREDITORS”. Third, we compare the pulled records from SOURCE with the active records from CREDITORS. From here we know which records technically need to be appended or updated.
Appending new rows to the CREDITORS table has been no problem and the performance is fine. Currently there are 5399 records inserted in about 1,2 sec. Updating records has been a real pain for us as it does work but it doesn’t seem to be using the right index. It takes about 3 minutes for 6399 records to be updated. Let’s get more into detail:
This is the configuration of our output data tool:
Output data tool for updating records to Oracle

In Oracle Enterprise Manager we can see the following plan when Alteryx tries to update the CREDITORS table:

If we compare the way Alteryx tries to update the table with PowerCenter, we see that PowerCenter does use INDEX UNIQUE SCAN instead of INDEX SKIP SCAN. That is probably the core of our problem that we like to solve (probably, since there’s always another solution). As one can see there is a index on the tabel in Oracle and the primary key of the table consists out of 4 columns.

From what we can read from various topics on the community is that it might have something to do with the datatypes going from Alteryx to Oracle. As you can see in the screenshot from Oracle Enterprise Manager there are some implicit conversions going on in the background. We basically tried to change datatypes of the 5 fields going into the data output tool (for the update).
| Field | Oracle datatype | Key field | Extra information | Datatype in Alteryx |
| CRED | VARCHAR2(16) | P2 | | Tried V_String, WString, String and V_WString |
| M | VARCHAR2(10) | P1 | | Tried V_String, WString, String and V_WString |
| S | VARCHAR2(40) | P4 | | Tried V_String, WString, String and V_WString |
| V | DATE | P3 | format = dd-mm-yyyy hh24:mi:ss | Datetime as there is a time component |
| T | DATE | | format = dd-mm-yyyy hh24:mi:ss | Datetime as there is a time component |
The last select tool before the data output tool doing the update to Oracle

We also tried to play with pre-sql to use the hint option of Oracle but that (obviously) doesn't do the trick.
select /*+ INDEX(CREDIT CREDITPK) */*
To conclude, we would really appreciate help in getting our update to Oracle to perform faster!