Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Truncate and insert vs drop and create
Philip Morrow doodled thusly:
>Which is the better way to empty a table and reload data.
>
>truncate, then use insert into x select ..... from y
>
>or is it better to
>
>drop table, then create table x as select ... from y???
>
if your table has no indexes, no synonyms, no views, no stored procedures and no authorizations using it, then drop/create is probably faster.
any exception and I'd say truncate is faster. since very few databases have tables that have no dependencies whatsoever then in most cases truncate, overall, will be faster.
Cheers
Nuno Souto
nsouto_at_optushome.com.au.nospam
Received on Thu Jan 17 2002 - 03:27:19 CST