Re: how to boost drop table statement
- From: Lee Fesperman <firstsql@xxxxxxxxxxxxx>
- Date: Sun, 19 Jun 2005 20:23:32 GMT
Thomas Kellerer wrote:
>
> John Currier wrote on 18.06.2005 20:22:
> >>You could try to TRUNCATE the tables first, but then they must not have
> >>foreign key constraints.
> >
> >
> > You just have to do them in the correct order (assuming no recursive
> > constraints).
> >
> > <plug>
> > SchemaSpy grew out of a tool that I wrote to determine that order.
> > It'll generate insertion order and deletion order lists of tables that
> > are intended to be used by load/purge scripts.
> > </plug>
> >
>
> No that won't help. There is a limitation on the usage of TRUNCATE with
> Oracle.
>
> Quote from the manual (9.2):
>
> "You cannot truncate the parent table of an enabled referential integrity
> constraint. You must disable the constraint before truncating the table."
>
> Even if the order is right, it won't help here.
Assuming no cross-referencing referential integrity, ordering would truncate the table
containing the FK reference first, thus it would seem to work.
Apparently, Oracle doesn't support the CASCADE option for DROP, which would eliminate
the similar ordering problem when using a list of DROP TABLEs. It also solves the
cross-referencing problem. Lack of standards support does have its consequences ;^)
--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
.
- Follow-Ups:
- Re: how to boost drop table statement
- From: Thomas Kellerer
- Re: how to boost drop table statement
- References:
- how to boost drop table statement
- From: Markusin
- Re: how to boost drop table statement
- From: Thomas Kellerer
- Re: how to boost drop table statement
- From: John Currier
- Re: how to boost drop table statement
- From: Thomas Kellerer
- how to boost drop table statement
- Prev by Date: Re: how to boost drop table statement
- Next by Date: Re: how to boost drop table statement
- Previous by thread: Re: how to boost drop table statement
- Next by thread: Re: how to boost drop table statement
- Index(es):
Relevant Pages
|