Staging Table creation - Help needed
Hi All,
My one of table is having 10 billion records and out of that we would like to extract 13 months data and create a new table.
So 13 months data is having 5 billion records and it is taking 2 days to create staging table. Please give me some suggestions
1. Create the table
2. Create index on the table
3. Gather DBMS_STATS on the table
Oracle - 10 G
Please see below example which we are using to create a table
CREATE TABLE schemaxyz.table_staging
TABLESPACE USERS_TEMP
PCTFREE 3
INITRANS 5
MAXTRANS 255
STORAGE (
INITIAL 10 m
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
)
NOLOGGING
as
SELECT *
FROM schemabc.USERS_Table e
WHERE e.created > add_months(sysdate,-13)
AND e.created <= sysdate
AND e.code IN(0,1,6)
and e.flag=0
Appreciate your help