Best way to replace Domain Aggregates

G

Guest

Hi guys,
I recently read that Dsum, etc functions really slow down performance when
database tables get split.

So, I tried to come up with a SQL / recordset for tax subtotals at the
bottom of my forms/reports, but cant get them to refresh the control when
amounts change. I have it setting in the form current event.

I wantetd to use a sum calculating field in the footer of my subform,
however there are different tax levels for each line, bugger. I have to use
a complex query to the tax tables.

Can anybody suggest the best method? Should I just stick w/ dsum. It does
work well now, but havent tested it on a network.

Thanks,
dp
 
R

Rick Brandt

dp said:
Hi guys,
I recently read that Dsum, etc functions really slow down performance
when database tables get split.

So, I tried to come up with a SQL / recordset for tax subtotals at
the bottom of my forms/reports, but cant get them to refresh the
control when amounts change. I have it setting in the form current
event.

I wantetd to use a sum calculating field in the footer of my subform,
however there are different tax levels for each line, bugger. I have
to use a complex query to the tax tables.

Can anybody suggest the best method? Should I just stick w/ dsum.
It does work well now, but havent tested it on a network.

Thanks,
dp

First you need some context on that statement. Domain aggregate functions cause
a new database object to be instantiated and all of its collections are
refreshed. This is the overhead that "can" be a problem. For this reason it is
not recommended to use a domain aggregate function in a loop or a query
(basically anyplace where it will called over and over).

If you simply have a few DLookups() on a Form or Report then the usual
recommendations for domain aggregate replacements really offer very little
advantage.

I would not mess with it until AFTER you see some performance problems. Also if
any of then are using criteria make sure that the fields in the criteria are
indexed (same advice as in a query).
 
G

Guest

Great. Thanks for your advise
dp

Rick Brandt said:
First you need some context on that statement. Domain aggregate functions cause
a new database object to be instantiated and all of its collections are
refreshed. This is the overhead that "can" be a problem. For this reason it is
not recommended to use a domain aggregate function in a loop or a query
(basically anyplace where it will called over and over).

If you simply have a few DLookups() on a Form or Report then the usual
recommendations for domain aggregate replacements really offer very little
advantage.

I would not mess with it until AFTER you see some performance problems. Also if
any of then are using criteria make sure that the fields in the criteria are
indexed (same advice as in a query).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top