R
Rémi
Can anyone elaborate on the performance impact of having a user-
defined function in a query? I inherited a large Access database
which had some interesting design choices applied to it - my current
concern is that business logic are found in a number of queries.
Say I have this:
tableA
* pkFieldTableA
* fielda1
* fielda2
* fielda3
qryB (based on tableB)
* pkQryB
* fkTableA
* fieldb1
* fieldb2
* SomeVBAFunction(fieldb1, fieldb2)
And a query that joins both with a WHERE clause that filters the
result set.
Can anyone tell me:
* Will SomeVBAFunction be evaluated for each and every row before the
set of records are filtered, or will only the subset of valid rows
have the function evaluated?
* From a performance perspective, is it preferable to have the
calculation in-line, or is the VBA call ok? (In my opinion, it would
be preferable not to have to do either, but anyhow.)
If it makes any difference, this runs on Access XP, but I also run
Access 2007.
Regards,
Remi.
defined function in a query? I inherited a large Access database
which had some interesting design choices applied to it - my current
concern is that business logic are found in a number of queries.
Say I have this:
tableA
* pkFieldTableA
* fielda1
* fielda2
* fielda3
qryB (based on tableB)
* pkQryB
* fkTableA
* fieldb1
* fieldb2
* SomeVBAFunction(fieldb1, fieldb2)
And a query that joins both with a WHERE clause that filters the
result set.
Can anyone tell me:
* Will SomeVBAFunction be evaluated for each and every row before the
set of records are filtered, or will only the subset of valid rows
have the function evaluated?
* From a performance perspective, is it preferable to have the
calculation in-line, or is the VBA call ok? (In my opinion, it would
be preferable not to have to do either, but anyhow.)
If it makes any difference, this runs on Access XP, but I also run
Access 2007.
Regards,
Remi.