Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MS Access (http://www.go4expert.com/forums/ms-access-forum/)
-   -   12 minutes to delte approx 65.000 records! (http://www.go4expert.com/forums/12-minutes-delte-approx-65000-records-t24185/)

LUCA90 15Dec2010 19:50

12 minutes to delte approx 65.000 records!
 
i use:
Code:


 
    GAFSTRING = "C:\GAF_TENDER\VIAGGIANTI_TABELLE.MDB"
    Set DATA_MART_CONN = New ADODB.Connection
    With DATA_MART_CONN
        .Provider = "Microsoft.JET.OLEDB.4.0"
        .Open GAFSTRING, "Admin", ""
    End With
.....
    With DATA_MART_CONN
    SQL = "DELETE * FROM VIAGGIANTI_TAB WHERE INDICE1='" & DATA_CREA & "'"
        .Execute (SQL), CONTA, adCmdText Or adExecuteNoRecords
    End With

to delte approx 65.000 records, but the time to exceute the query is arround 12/13 minutes! possible to optimize?
tks.

note:
- the field INDICE1 is indexed
- i use vba for excel


All times are GMT +5.5. The time now is 15:10.