I ran both tests on queries as well as tables
The queries did include an indexed field.
Just for info I redid both sets of tests on the
PK field itself.
That had the effect of speeding up the DCount & slowing down the recordset methods with typical results as follows:
Number of loops 100; DCount : N = 2616838 ; Time taken 3.66 seconds
Number of loops 100; RecordsetCount: N = 2616838 ; Time taken 3.77 seconds
Not a lot in it but DCount slightly faster each time I tested
Next I ran the count on an
unindexed field which was inevitably going to be
much slower. In fact it was so slow that running each 100 times would have taken a ridiculous time.
The following is for 10 loops
Number of loops 10; DCount : N = 2175016 ; Time taken 213.32 seconds
Number of loops 10; RecordsetCount: N = 2175016 ; Time taken 214.65 seconds
So multiplying up by 10 for a likely 100 loop outcome, both times would be around 2130 seconds instead of around 3.7 seconds! Almost 600 times larger!!!!!