Chuck Posted December 14, 2000 Posted December 14, 2000 Is anyone aware of the relative merits (speed, size, etc.) of using the Sum function versus simply adding fields together? For instance, is there an advantage of using: Sum( field1, field2, field3, field 4 ) instead of field1 + field2 + field3 + field4 ? Thanks, Chuck
Vaughan Posted December 17, 2000 Posted December 17, 2000 Maybe on Monday I'll make a database and test it out. How does this methodology sound: Db with lots of records has two calculations fields, one sum() one (+) both set to unstored. Create a script that enters current time into global field, performs find on sum field, records time into global field, performs find on (+) field, enters current time into global field. Sound OK?
MacNut Posted December 18, 2000 Posted December 18, 2000 Wow, You learn something new every day. I never realized that the Sum Function works with commas and actually Sum's up all the fields. I have actually gone to the extent of Sum(field A) + Sum(field : etc. Will wonders never cease!
LiveOak Posted December 18, 2000 Posted December 18, 2000 Chuck, this is total speculation, but since Sum() is context sensitive and may act across fields in the same record, related records, etc., I'd guess that plain ole + and - are faster. The use of Sum() also makes your solutions harder to understand. -bd
McGoo Posted December 18, 2000 Posted December 18, 2000 I know that this is not helping the original query but it is a related query that I have and I was wondering if anyone can help me. I am trying to create a field that will calculate the sum of a value in a field for all the records in the file. I know this is available by creating a summary field but there is so many records in my file this slows my database down considerably when opening it.
Recommended Posts
This topic is 8812 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now