Hello,
How much slower is it really to use dynamic queries.
In Access and Access VBA books which cover ADO you always see recordsets built with SELECT queries in VBA. These queries, which I assume are the definition of dynamic queries, as they are built on the fly with parameters supplied by the user or other variables, seem to be used all the time, but I assume slow down the database as they are compiled each time.
I guess one must balance using too many stored queries as they add to the size of the database. (But surely you can achieve the same by saving a parameterised stored query and passing the parameters from user input or other variables)
But which is really the best
Also can you use a temporary QueryDef object instead or achieve the same reulsts with the CurrentData object.
I am trying to build the quickest, most efficient, optimised database possible and know that these issues are important.
Any help please
Thanks
Phil
How much slower is it really to use dynamic queries.
In Access and Access VBA books which cover ADO you always see recordsets built with SELECT queries in VBA. These queries, which I assume are the definition of dynamic queries, as they are built on the fly with parameters supplied by the user or other variables, seem to be used all the time, but I assume slow down the database as they are compiled each time.
I guess one must balance using too many stored queries as they add to the size of the database. (But surely you can achieve the same by saving a parameterised stored query and passing the parameters from user input or other variables)
But which is really the best
Also can you use a temporary QueryDef object instead or achieve the same reulsts with the CurrentData object.
I am trying to build the quickest, most efficient, optimised database possible and know that these issues are important.
Any help please
Thanks
Phil