1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

12 minutes to delte approx 65.000 records!

Discussion in 'MS Access' started by LUCA90, Dec 15, 2010.

  1. LUCA90

    LUCA90 New Member

    Joined:
    Mar 3, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    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
     

Share This Page