John Cantu, October 13, 2015 - 10:47 pm UTC
Hi Connor. Thanks for your response. It was very useful.
I do have a few follow-up questions regarding updating a Basicfile.
So in order to find what how much data is being updated, I have to speak with the application developers? That is too bad since I don't have access to the application developers because the application is a commercial software. I was hoping that I would be able to query that from within the database.
In our case, the LOB is storing XML data and it should only modify a tiny amount of LOB data, does Oracle provide different "update LOB" commands? I want to make know if it is possible for a developer to set it up to update all of the LOB with every tiny change or if Oracle has protections in it to perform the smart thing which is to only modify the tiny amount that changed in the LOB.
Here is an example of the types of LOBs were are dealing with:
Create table "trxt"
(ID varchar2(200), lobt blob
primary key(ID)
LOB (lobt) STORE AS BASICFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))
If I see this type of SQL being executed on the database for the LOB column, does it mean that they are reloading the LOB every time instead of just updating the changed pieces of the LOB?
"update table_name set LOB_COLUMN='xxxxxxxxxxxxxx' where ...."
If that is the case, can you point me to the Oracle documentation that I can pass to the vendor so that they can use efficient LOB update commands? I looked at Oracle's SecureFiles and Large Objects Developer's Guide, but it wasn't clear to me what package a developer uses to perform updates of only what has changed.
October 14, 2015 - 12:40 am UTC
"update table_name set LOB_COLUMN='xxxxxxxxxxxxxx' where ...."
Yes, thats basically a 'replace' operation.
Tell the vendor to check out DBMS_LOB if they use PLSQL for reading/writing portions of a LOB, and similar facilities exist in the other interfaces (eg, ODP.Net has an OracleCLob class, etc)