How to copy a large oracle table into another without tmp issues
1
vote
0
answers
45
views
I have a table "FOO". I have created a table "BAR" such as
CREATE TABLE BAR
PARTITION BY RANGE (BAR_ID)
INTERVAL (1)
(
PARTITION p0 VALUES LESS THAN (1)
)
AS
SELECT *
FROM (SELECT * FROM FOO)
WHERE 0=1;
ALTER TABLE BAR
ADD CONSTRAINT BAR_PK PRIMARY KEY (BAR_ID);
I wanted to do
INSERT INTO BAR
SELECT /*+ APPEND */ * FROM FOO;
And later drop FOO and rename BAR into FOO.
But during the INSERT INTO, ORA-01652: unable to extend temp segment by 128 in tablespace TMP
How can I copy FOO into BAR without using all memory ? What is the best practice ?
Asked by Calimero
(111 rep)
Apr 10, 2025, 11:28 AM