Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speeding up calculations

Status
Not open for further replies.

Lemur21

Technical User
Jun 23, 2006
17
US
Hello,

I'm working on finalizing my database -- I've come a long way!

Regrettably, the wall I've recently hit is a pretty big one. A lot of my calculations in one file take AGONIZINGLY long to compute. I even tried to store them, but I'm unable to do so. Does anyone have any ideas about how to speed up the calculations?

Thanks!

Chris
 
Chris,

I not trying to be a "wise guy" here but are you sure that you really need all of the calculations? I assume you are talking about calculated fields right?

I think lots of FM Developers overuse calculated fields. For instance, if they intend to send out occasional form letters to customers they will create a calculated field to hold the body of the letter. It may be something like:

"Dear" & FirstName & " " & LastName & "You are a dirty rotten...". You get the picture.

In my way of thinking this method is a LOT of overhead for Filemaker to create and maintain a field like this for every single record 24 x 7.

If I had a need for the form letter I would probably construct it in either a script variable or a global field on an as-needed basis. I would probably have a looping script that passed through the records one-by-one, creating the calculation (letter body), then sending the message. That way there would be no need for FM to be continually calculating and storing the message body around the clock when it is really only needed for a second or two every so often.

Clear as mud?

-Striker
 
I'm sorry but I'm finding it difficult to see how to start a new query, being a first timer at this. My query is that when I start Filemaker I keep getting a message telling that Instant Web Publishing can't work because the port 80 is not available. I checked on System Preferences and found that 2 other ports can be used 427 and 443. Are these the only ports that will work and what happens if you select another number. I did and can never use that version of filemaker again for Web Publishing as filemaker doesn't seem to allow you back in to change that incorrect port selection. I am using 8v3 and now 8.5. Version 8v3 cannot be used for web publishing as its locked out with the wrong port number and no access to change it.
 
Striker..

Actually, I was able to save the fields as auto-entered calcs, which can be indexed.

Basically, within each record, I only need the calc done once -- when the record is first created.

The problem was, in another file, there's a consistent re-checking of those records, for 'totals' -- and THAT's where the indexing helps -- now, those 'totals' load super-quick.

Chris
 
What can be a danger here is your 'Basically'...
Not knowing your structure, there can be a need for a recalculation...

Make sure in your start up script to force a relookup, or even a button somewhere to do a forced relookup.

The moment you see there 'is' a relookup, check your design again...

Avoid calculations within calculations and make sure only really needed index fields are indexed.

And as, Striker pointed out, check if you can make a 'global' calculation with scripts instead of constant calculations on the fly...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top