2 Replies Latest reply on Sep 29, 2011 5:14 AM by daveealex

    Last Calculation is very slow



      Last Calculation is very slow


      I have a layout that uses a cartisian relation to show data in 4 portals by category. The categories are determined by a last () calculation field. This last () data comes from another related table. Each record on the parent table passes through 5 categories 1 at a time(a new record in the child table for each category).

      It seems to me that the last () calculation is recalculating all the records everytime. The main table has about 11000 records and the child table has 12800 records. These 2 tables are growing very quickly and the last() calculation seems to be getting slower, which i would think it would. I have the last to recalculate as needed.

      I am looking for a way to resolve this problem any idea would be a big help. I hope this is clear


        • 1. Re: Last Calculation is very slow

          Do you see any difference in performance if you define a sort order on a relationship to this table so that you can just refer to the first related record instead of the last?

          Also, a script that uses Go To Related record followed by Go to record/request/page/last could also access the data on this same "last" related record.

          • 2. Re: Last Calculation is very slow

            Thanks for the response Phil. Sorry it took so long to answer. Thank you for the idea. The sorting did not change anything, so moved on to scripts

            I have created 2 scripts

            1. I created a script that does a search that uses the master record id and then go to last created child record. I also have the date and hour the record was created so at that point i can sort as needed. At this time It seems to be working much faster.

            2. I used your idea which is close to the script 1 above, but used Go To Related record then Go To last as you recomended. This script seems even faster than script 1.

            Thanks again Phil.