I have to do a lot of Querys on the same page with thousands of records and would like to know which one of these is a faster operation:
1. sql = "SELECT id FROM Table..."
Rs.Open sql, conn
TCount = Rs.RecordCount
2. sql = "SELECT count(id) as c FROM Table..."
Rs.Open sql, conn
TCount = Rs.Fields("c"
or even this
3. sql = "SELECT id FROM Table..."
Rs.Open sql, conn
array = Rs.GetRows()
TCount = Ubound(array,2)
Otherwise, is there any already written function to calculate the time an operation lasts?
1. sql = "SELECT id FROM Table..."
Rs.Open sql, conn
TCount = Rs.RecordCount
2. sql = "SELECT count(id) as c FROM Table..."
Rs.Open sql, conn
TCount = Rs.Fields("c"
or even this
3. sql = "SELECT id FROM Table..."
Rs.Open sql, conn
array = Rs.GetRows()
TCount = Ubound(array,2)
Otherwise, is there any already written function to calculate the time an operation lasts?