Jump to content
Server Maintenance This Week. ×

difference between no index and recalculate


This topic is 2292 days old. Please don't post here. Open a new topic instead.

Recommended Posts

When you have a calculation, what is the difference between the storage options "Indexing - None" and "Do not store calculation results - - recalculate when needed"

To my mind the first one should equal the second one, but Indexing-None does still seem to store the old result.

Link to comment
Share on other sites

Hi Jim

Well you kind of answered your own question, they are different.

"Do not store calculation results - - recalculate when needed" tells FileMaker to recalculate the result whenever it is displayed or needed for another calculation. It helps to make sure that results are not retained when values in related records (in particular) change. FileMaker doesn't usually notice these related-table changes if you don't check that box.

"Indexing - None" - is a separate consideration, and I would say you should not very often need to select this. It tells FileMaker not to index the field, which means that searching on that field will be much slower potentially. It can be useful to save disk space if you have a field on many, many records that you never want to search on, and you don't want to waste the disk space that an index uses.

I would say that for a field with "Do not store calculation results - - recalculate when needed" then FileMaker will not store an index anyway, as you have explicitly told it to recalculate that field whenever required, which would include a 'Find' being performed on that field.

Hope this helps?

Link to comment
Share on other sites

If I may recommend, try to shy away from unstored calculations. Try to script your actions and set fields for minimal indexing - index when needed. A lot of people —especially when they start out with FileMaker— tend to use calculations heavily because it's a quick method of getting results. In the long run, however, they can greatly slow your solution. I usually think: can I script this? If I can, I will. The thing to pay attention when scripting is that you will have to script both the setting and removing of data. So let's say you sell items and you want the total sales for one customer. You could set a field in the Customer table when there's a new invoice for them. But if that invoice gets reversed, you'll have to script the removal of the amount from the total.

 

Hope this helps.

Link to comment
Share on other sites

This topic is 2292 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.