AnsweredAssumed Answered

Sort Performance - Table Relationship vs Scripted Sort - arriving on a sorted found set

Question asked by ericjlindholm on Oct 18, 2017
Latest reply on Oct 19, 2017 by user19752

My goal is simply to display a sorted found set or related records.  My desired found set may exclude some child records from the my main TO structure for display purposes.  For example, on a pull sheet, I don't want a user to see line items that marked as labor or transport items.  I do not display line items in portals because I need to sort them by sub summaries.

 

When I started my file on FM11 I think, I had issues with scripted sorts taking an obnoxiously long time.

I had a million other things I was doing wrong that I am working to undo to this day.  that included a TON of unstored calcs that are mostly gone now accept for the a few that are totally necessary. 

 

I stumbled on what I thought was a "fix".  If I used a sorted relationship and a GTRR, I could arrive at my found set already sorted properly in much less time than GTRR then sort.  It really helped at the time but I think only because I was doing something else in my data totally wrong.

 

I am realizing tho that there are a few issues with this.

1 - In order to sort on fields in related records, I am adding duplicate fields to child records that I need to spend resources (looping transaction scripts and the time to write/maintain them) on keeping in "sync" with the parent records.

2 - FM is sorting this data every time one of these relationships is invoked which can slow some things down.

 

Based on my testing now, I am finding that there is little to no difference between sorting after a find or GTTR through an sorted step and or using the "baked in" sort in a GTRR

 

Can anyone confirm that finding?  I would love to chop a couple of fields out of a some rather wide tables.

 

What is your preferred technique for displaying a set of related records? 

 

 

GTRR > exclude undesired records > sort?

dedicated GTRR that excluded desired records > sort?

go to layout > find > sort?

Outcomes