Hello all. First of all, thanks to all the knowledgeable folks out there willing to contribute. I've learned quite a bit as a lurker.
I have a function that is passed some information about a tree, including the species. This function performs a simple calculation on the information passed, with parameters (2) that differ by tree species. These parameters are stored in a separate table. There are a lot of trees (~220k) and only a few species (~7). My question is, will it be faster to:
1) Copy the parameters table into an array, then loop through the array each time the function is called to find the right ones for the species?
2) Maintain an open recordset and use .Find to get the correct parameters for the species?
3) Open the recordset each time the function is called, using SQL to select the correct parameters?
Thanks!
I have a function that is passed some information about a tree, including the species. This function performs a simple calculation on the information passed, with parameters (2) that differ by tree species. These parameters are stored in a separate table. There are a lot of trees (~220k) and only a few species (~7). My question is, will it be faster to:
1) Copy the parameters table into an array, then loop through the array each time the function is called to find the right ones for the species?
2) Maintain an open recordset and use .Find to get the correct parameters for the species?
3) Open the recordset each time the function is called, using SQL to select the correct parameters?
Thanks!
Last edited: