Hi M,
Best way to know for sure is to create both queries on your system and time their execution. For example, the following times an insert operation on my system from a table with 225,000 records to a target table. Total elapsed time equals about 15 seconds. I commented out a loop which performs the operation 10 times:
Public Sub TestAddByAppend()
Dim dbs As DAO.Database
Dim varTimeStart As Variant
Dim varTimeEnd As Variant
Dim intCount As Integer
Set dbs = CurrentDb
varTimeStart = Time
Debug.Print "Start Add By Append: " & varTimeStart
'For intCount = 1 To 10
dbs.Execute "Delete * from tblTarget;"
dbs.Execute "INSERT INTO tblTarget ( Field1, Field2 ) " _
& "SELECT DISTINCTROW S.Field1, S.Field2 " _
& "FROM tblSource As S;"
'Next intCount
varTimeEnd = Time
Debug.Print "End Add By Append: " & varTimeEnd
Debug.Print "Elapsed Time: "; DateDiff("s", varTimeStart, varTimeEnd)
dbs.Close
End Sub
The results displayed in the debug window are:
Start Add By Append: 9:36:47 PM
End Add By Append: 9:37:02 PM
Elapsed Time: 15
Can't beat that for certainty.
HTH,
Bob
|