Do “built on-the-fly” queries executed using VBA “db.execute sqlString” syntax use the Jet Optimizer, or do they examine every record in the underlying tables?
I’ve got a VBA process that uses a series of db.execute statements, and processing time has not been an issue with smaller databases. My current dataset has about 1.5 million and 0.7 million records in two underlying tables, and it is taking an absurdly long time to process. All the fields used in the queries are indexed. Would it benefit from writing Parameter Queries to replace the “built-on-the-fly” sql statements? I’ve never used Parameter Queries previously, so am not certain how to use them in my VBA code.
The backend is A2000 and the frontend is A2003.
Thanks in advance.