In my system, I have a set of Oracle 19c database tables which stored temparary data, which are getting expired. I have a solution where I partitioned these tables with the create timestamp of these entries.
CREATE TABLE TEMP (
ID VARCHAR (100) NOT NULL,
TYPE VARCHAR(100) NOT NULL,
CONTEXT_OBJECT BLOB,
TIME_CREATED NUMBER(19)
)partition by range (TIME_CREATED) INTERVAL(<some value>)
In this I have tested that setting the INTERVAL to for a value equivalent to a one day.
In this scenarios, partition size is growing about 300 GB during the day.
I can see that initial insert queries are file but with the DB load INSERT INTO VALUES (...) ...
queries getting sometimes 10 seconds to complete.
So I wanted to try reducing the interval to may be 1 hour instead of a day and check if it improves performance of the insert queries. As per the analysis the root cause for the insert query to get slow is due to DW – contention.
FYI The index for this table is global indexes. One column also contains a BLOB object too.
The reason for partitioning is to drop partitions based on their TIME_CREATED once a expirey time exceeds.
Can someone help me figure this out?