Fastest Deletion Of Entire Table Contents

Fastest Deletion Of Entire Table Contents

Post by Louis Woo » Fri, 28 Mar 1997 04:00:00



What is the fastest way to delete an Access table in VB?  currently I am
using the following Action Query:  

    dbAxysData.Execute "DELETE * FROM " & tblAxysData

This works, but it takes more than 12 minutes to complete.  I am
considering the following and would appreciate your input:

1) Delete the entire table (as opposed to deleting the records within the
table) then re-create it.  I know that it is possible to delete a TableDef,
but I am not clear on whether you can delete the table itself and the data
that it contains.  

2) Delete the MDB file then copy a new one in from another sub-directory.  

Stats:

*VB 3.0 Pro
*Access 2.0 database file with Compatibility Layer
MDB size:    26 MB
Records:     265,000
Workstation: Pentium 133, 43 MB RAM
Nertwork:    10Base-T (MDB in on a server)

* This application will be ported to VB 5 Enterprise with an Access 97
database file sometime in the next few months.  

Thanks for any help.  

Louis Wood

 
 
 

Fastest Deletion Of Entire Table Contents

Post by Joe Mak » Sat, 29 Mar 1997 04:00:00


Quote:>1) Delete the entire table (as opposed to deleting the records within the
>table) then re-create it.

Drop the entire table:

dbAxysData.Execute "DROP  TABLE " & tblAxysData

    ...Joe Maki
    MT Kupp & Associates


 
 
 

Fastest Deletion Of Entire Table Contents

Post by Alan Matthew » Wed, 02 Apr 1997 04:00:00


If this process is something you don't have to perform while the user
waits, maybe you could schedule a delete at night while the user goes
home.

If you have any information about this, please provide more so I can
help more.


> you can also try the TRUNCATE sql operation.  I'm not sure if access
> supports this but the major DBMSs do.  Good luck



> > What is the fastest way to delete an Access table in VB?  currently I am
> > using the following Action Query:

> >     dbAxysData.Execute "DELETE * FROM " & tblAxysData

> > This works, but it takes more than 12 minutes to complete.  I am
> > considering the following and would appreciate your input:

> > 1) Delete the entire table (as opposed to deleting the records within the
> > table) then re-create it.  I know that it is possible to delete a
> TableDef,
> > but I am not clear on whether you can delete the table itself and the
> data
> > that it contains.

> > 2) Delete the MDB file then copy a new one in from another sub-directory.

> > Stats:

> > *VB 3.0 Pro
> > *Access 2.0 database file with Compatibility Layer
> > MDB size:    26 MB
> > Records:     265,000
> > Workstation: Pentium 133, 43 MB RAM
> > Nertwork:    10Base-T (MDB in on a server)

> > * This application will be ported to VB 5 Enterprise with an Access 97
> > database file sometime in the next few months.

> > Thanks for any help.

> > Louis Wood

 
 
 

Fastest Deletion Of Entire Table Contents

Post by Bernard Apolinari » Wed, 02 Apr 1997 04:00:00


you can also try the TRUNCATE sql operation.  I'm not sure if access
supports this but the major DBMSs do.  Good luck



Quote:> What is the fastest way to delete an Access table in VB?  currently I am
> using the following Action Query:  

>     dbAxysData.Execute "DELETE * FROM " & tblAxysData

> This works, but it takes more than 12 minutes to complete.  I am
> considering the following and would appreciate your input:

> 1) Delete the entire table (as opposed to deleting the records within the
> table) then re-create it.  I know that it is possible to delete a
TableDef,
> but I am not clear on whether you can delete the table itself and the
data
> that it contains.  

> 2) Delete the MDB file then copy a new one in from another sub-directory.

> Stats:

> *VB 3.0 Pro
> *Access 2.0 database file with Compatibility Layer
> MDB size:    26 MB
> Records:     265,000
> Workstation: Pentium 133, 43 MB RAM
> Nertwork:    10Base-T (MDB in on a server)

> * This application will be ported to VB 5 Enterprise with an Access 97
> database file sometime in the next few months.  

> Thanks for any help.  

> Louis Wood

 
 
 

1. Fast clearing down of entire table contents

Hello Group,

PROGRESS v8.2c
SCO OpenServer v5.0.4

I have a database ('pricechange'), containing a single table
('price-changes') of three fields, which is primarily empty, but is
propogated by a 40,000 record csv file using the PROGRESS data dictionary.
The import takes around 3 or 4 minutes.

When I've finished with the data, I need to clear down the table (ie: delete
each record), but if I run:

FOR EACH pricechange.price-changes:

    DELETE pricechange.price-changes.

END.

It takes about 20 minutes (likely longer) to run. Aside from just deleting
the database/table and re-creating it, is there a faster method/command I
can use to clear down the table?

Thank you very much in advance for any suggestions.

2. Password protecting the Access database

3. Fast Deletion For Large Tables

4. Error using table repair utility

5. D3/NT ODBC Call Failed

6. Erasing Contents of a Table Fast

7. How to make faster deletion on duplicated records?

8. Fast unload of entire DB...(tools)

9. Fast deletion of many records?

10. Sql script to copy table and contents to new table