1 2 3 4 Previous Next 46 Replies Latest reply on Jan 30, 2015 5:18 PM by disabled_jackrodgers

    Table Occurrence Sort vs. Portal Sort - Which is faster?

    deephat

      From a performance standpoint does it make any difference if I define the sort order in the Table Occurrence compared to setting it in the Portal settings?

       

      Is there anything that I can do to improve sorting speed?

        • 1. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
          keywords

          I don't know about speed, but I imagine sorting at TO level means FM will maintain the relationship in a sorted state, whereas sorting at portal level means the sort will only occur when that specific portal is on screen. Someone else withe deeper knowledge of FM's inner workings will be able to comment further, I'm sure.

          • 2. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
            mtwalker

            If you sort on the relationship then any time you access records via that relationship, FileMaker has to sort them. With a large number of records that could slow things down. I prefer to sort the portal.

            • 3. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
              wimdecorte

              How many records are typically shown in the portal?

              How many predicates in the relationship?

              How many sort criteria?

              • 4. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                deephat

                wimdecorte wrote:

                 

                How many records are typically shown in the portal?

                How many predicates in the relationship?

                How many sort criteria?

                 

                I am using the portal to display approximately 25,000 contacts. When the portal opens all 25,000 contacts are visible in the portal. I am using a search filter that performs real-time filtering as the user types their search query. (I am not using portal filtering, I am filtering from the relationship Table Occurrence.)

                 

                I have used this configuration for quite a while and from a performance standpoint we have not had any issues. Now users are asking for more sorting options and I am trying to determine the method to use with the fastest sorting results.

                 

                There are currently two predicates in the relationship.

                 

                Users would like the ability to sort by: Company Name, First Name, Last Name, Last Invoice Date, Sales Total.

                • 5. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                  deephat

                  Yes, this is what I am trying to get a better understanding of. It's not clear to me if it matters which one I choose. They both seem to sort when the portal is displayed.

                   

                  I don't know about speed, but I imagine sorting at TO level means FM will maintain the relationship in a sorted state, whereas sorting at portal level means the sort will only occur when that specific portal is on screen. Someone else withe deeper knowledge of FM's inner workings will be able to comment further, I'm sure.

                  • 6. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                    wimdecorte

                    deephat wrote:

                     

                    I am using the portal to display approximately 25,000 contacts. When the portal opens all 25,000 contacts are visible in the portal.

                    I would seriously reconsider that.  Use a list view instead if you want the user to start off with the full set.

                     

                    Or start the portal with no records.

                     

                    Showing 25,000 will force FM to load all those records for no good reason because the next thing the user does is filter it down.

                    • 7. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                      deephat

                      wimdecorte wrote:

                       

                      I would seriously reconsider that.  Use a list view instead if you want the user to start off with the full set.

                       

                      Or start the portal with no records.

                       

                      Showing 25,000 will force FM to load all those records for no good reason because the next thing the user does is filter it down.

                       

                      Can you please explain how this impacts sorting?

                      • 8. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                        BruceRobertson

                        You have been given enough information.

                         

                        Try using a list view as suggested and observe for yourself.

                         

                        I have to agree 25,000 records in a portal is not at all realistic or useable.

                        • 9. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                          taylorsharpe

                          You want to minimize the times FileMaker has to sort a entire table, so it is really best to not make the relationship a sort unless it is really necessary.  Just realize every time you access those records even if you don't need the sort, FileMaker is thinking it through.  If you do it only in the Portal, then only when that layout with the portal is displayed will it sort.  Keep in mind also that a portal on a layout brings down all records meeting the relationship even if you have a filter.  So to make things go faster, make a relationship to filter the data instead of using Filter in the portal table.  None of this matters if you don't have many records, but the larger your file gets, the more such things make a big difference.  Sometimes I even do virtual arrays to increase performance to have SQL only pull down records that need displayed in a portal. 

                          • 10. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                            keywords

                            The thing to remember is that even if a portal is only large enough to display a few rows, from FM's point of view it loads all the records capable of being accessed via that portal relationship.

                             

                            As Wim has already suggested, set up your portal so that it starts with no records, and set up your search filter so that it loads matching records rather than excluding non-matching ones, which presumably is what you currently do.

                            • 11. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                              BruceRobertson

                              Taylor, note that deephat did specify that he is not using portal filtering.

                              • 12. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                                wimdecorte

                                No user is going to look at / take in all 25,000 records at once.  So forcing FM to load those records AND sort them is a total waste of resources.

                                 

                                If the only purpose is a search mechanism, then use an list view, start with 0 records and let the user do a search.  Whatever records it finds, then sort those.

                                And do some scripted checks to prevent the users from doing meaningless finds like searching only for "a" to make sure no big meaningless found sets are produced.

                                • 13. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                                  deephat

                                  All I was really trying to get a better understanding of was if there is any performance difference between defining the sort order in the table occurrence compared to defining the sort in the portal settings. I still don't know for sure which is better but I will do as you have suggested and perform my own tests. I appreciate the tips regarding the portal filtering. Thanks

                                  • 14. Re: Table Occurrence Sort vs. Portal Sort - Which is faster?
                                    wimdecorte

                                    deephat wrote:

                                     

                                    I still don't know for sure which is better

                                    The answer we've been trying to give you is that this aspect is irrelevant for what you are trying to achieve.  It is the loading of all 25,000 records in the portal that is going to kill performance.  The sorting just adds to it.

                                    1 2 3 4 Previous Next