Subject | Re: [ib-support] How to delete all rows? |
---|---|
Author | Ann W. Harrison |
Post date | 2002-01-03T23:46:25Z |
At 10:25 AM 1/4/2002 +1100, David K. Trudgett wrote:
delete from <table> with no qualification and, if possible, just drop
the table structures. That would not work if any other connection had
a prepared statement that referenced the table or if any compiled procedure
referenced the table or if any trigger on another table referenced the
table or if the table is referenced in a foreign key definition. It will
be blindingly fast.
Regards,
Ann
www.ibphoenix.com
We have answers.
>On Thursday 2002-01-03 at 19:10:22 -0300, Clément Doss wrote:Something that's on my list to do is to recognize the specific command
>
> > Is there a way to delete ALL the records from a table REALLY fast.
> > In SQL Server there is a TRUNCATE TABLE MyTable function that is
> > very fast How can I do that in FB RC2?
>
>Under some circumstances, you could get away with dropping the table
>and re-creating it.
delete from <table> with no qualification and, if possible, just drop
the table structures. That would not work if any other connection had
a prepared statement that referenced the table or if any compiled procedure
referenced the table or if any trigger on another table referenced the
table or if the table is referenced in a foreign key definition. It will
be blindingly fast.
Regards,
Ann
www.ibphoenix.com
We have answers.