G
Guest
Does anyone know why a first record query takes so long and subsequent
queries are seemingly immediate?
I split a database and stored a 15,000-record table on one PC and copies of
the forms on about six other PCs on the network. Whereas the first query
(after the form is opened) can take up to 45 seconds to pull relevant records
across the network, subsequent queries are immediate, regardless of search
criteria or number of records found.
Here's how I'm querying the table:
dim MyDatabase as database
dim MyRecordset as recordset
dim strSQL as string
dim strCriterion as string
set db = currentdb
strCriterion = 12345
strSQL = "Select * From MyTable Where PartID = " & strCriterion
set rs = db.opendrecordset(strSQL)
queries are seemingly immediate?
I split a database and stored a 15,000-record table on one PC and copies of
the forms on about six other PCs on the network. Whereas the first query
(after the form is opened) can take up to 45 seconds to pull relevant records
across the network, subsequent queries are immediate, regardless of search
criteria or number of records found.
Here's how I'm querying the table:
dim MyDatabase as database
dim MyRecordset as recordset
dim strSQL as string
dim strCriterion as string
set db = currentdb
strCriterion = 12345
strSQL = "Select * From MyTable Where PartID = " & strCriterion
set rs = db.opendrecordset(strSQL)