I have a very simple table, on Oracle 10g, that keeps the log messages from a process. This table generates about 1 GB per day. I would like to keep just 1 week of data.
What is the best approach to accomplish this? Create a procedure that continuously delete the old data? Do I need to use partitions?
I can delete/truncate/drop the entire table if necessary.
This is the table:
CREATE TABLE "TABLE_LOGS"
(
"TABLE_ID" VARCHAR2(200 BYTE),
"TABLE_NUMBER" NUMBER(19,0),
"DESCRIPTION" VARCHAR2(2000 BYTE),
"DATE" TIMESTAMP (6),
"TYPE" VARCHAR2(100 BYTE),
"LEVEL" NUMBER(*,0)
)