2 Replies Latest reply on Apr 12, 2011 2:39 PM by CharlieMaitland

    Sort Records very slow_Better Way to do this?

    bookalaka_1

      Title

      Sort Records very slow_Better Way to do this?

      Post

      Recently purchased FMgo after having FMT is quite a delight to use. I am having a preformance issue and wondering if there is a better way to approach my searches. The database is approximately 2000 records of items that are either in or out of stock. My script goes to the layout, finds the items "In Stock" and sorts by alphabetic code. On my laptop there is no delay but on the Iphone 3gs the find and sort is very slow is there a setting I need to change or this is just the performance quality I should expect?. All of the fields are indexed. My script is straight forward as follows:

      Select Window Name "Inventory"

      go to layout "pb_List"

      perform find [restore] goes to field and finds the "In Stock"

      Sort Records

      go to record request/first

        • 1. Re: Sort Records very slow_Better Way to do this?
          philmodjunk

          Processors for iOS devices are slower than your laptop. There may be no way to improve on this with the currently available hardware.

          Are you sure that the In Stock field is stored/indexed? Such a field often is unstored due to references to a related table.

          Do you really need to find all records where the product is instock?

          What if you found all records whose name was < "j" and in stock and sorted those, then performed a find for all records whose name is >"j" and in stock when you need to work with the rest of the list?

          • 2. Re: Sort Records very slow_Better Way to do this?
            CharlieMaitland

            Hello,

            Great suggestion from PhilModJunk but if you do not want to break up the data into small subsets, you could

            1. Set FileMaker to use minimal indexing for the text field being sorted (index only the first 100 characters ), or

            2. Create a new number field as the key field to sort on, it will sort faster.  You have to come up with a formula to represent the text string you are currently sorting.  This is basically building an alternate index that is smaller in size and sort on that.  But the processor speed limitation will not get any better.

            Regards,

            Charlie M.

            FMBiz.net