TRUNCATE v DROP TABLE question
From: harry <a_at_abc.com>
Date: Thu, 24 Jan 2002 12:07:59 GMT
Message-ID: <nhtv4u0koeahbec0jl0gbarhs9e41k98s4_at_4ax.com>
Date: Thu, 24 Jan 2002 12:07:59 GMT
Message-ID: <nhtv4u0koeahbec0jl0gbarhs9e41k98s4_at_4ax.com>
Using Oracle 8i on NT Server 4 (sp6a)
I have a table that gets populated from scratch every week or so using a "CREATE TABLE tablename as
SELECT ..." statement.
As the table is very large its a bit tricky to try all different speed tests on it so I was
wondering if somebody could tell me if this is the quickest way to do this?
Should I -
- use a "TRUNCATE TABLE" statement & use a "INSERT INTO" instead? - will the indexes automatically be dropped aswell? - I don't want them active when doing an INSERT - do I have to recreate them after?
- Use "DROP TABLE tablename cascade constraints" statement? - does this remove indexes aswell?
- any other ideas?
Many thanks
HArry Received on Thu Jan 24 2002 - 13:07:59 CET