6 Replies Latest reply on Jul 28, 2014 11:12 AM by Stephen Huston

    Delete Found Set taking too long


      Hello there,


      the situation: a table of 6000 records with container fields for pdfs all stored in the table

      file is hosted by FMServer13v3 on Windows Server 2012


      client connected is FMP13v3 on MacOS 10.8.5


      client has a found set of 2 records out of the 6000 and a delete found set has been applied.

      the last records has a container field content storing a pdf of size 20 MB.


      previous deletions of found sets using same described procedure succeeded (container field content size was not that high though).


      the progress bar of the deletion shows "Records remaining to delete: " and all is blue

      - so it seams to be stuck on the last record's deletion.


      I am waiting now on a pretty fast WAN connection for the last deletion to complete.

      I am still connected to the server as the admin console displays but the statistics show that nothing is happening anymore.


      this is all happening now while i am writing this note and i am not sure if i should disconnect the client from the server via the admin console

      or just wait another hour?


      any ideas?

      (next time i will run a server side executed deletion on the record)


      thank you.


        • 1. Re: Delete Found Set taking too long
          Stephen Huston

          WAN connection? Ouch.


          My thought would be to empty the container field of its big content and commit the record, then pause a few seconds before doing the record deletion. That might bring the record down to where a Delete Found Set wouldn't hang or take so long via that connection.

          • 2. Re: Delete Found Set taking too long

            I would assume the container is causing some slowdown in the deletion process, but it is still only 2 records. Is this a default delete using the FileMaker script step or are you doing anything else? In addition, are you perform any cascading deletes? It may look like 2 records, but you could be deleting many child records if cascading deletes is set up.


            Server-side will generate faster results, but you must make sure you have adequate error trapping and also see if the server can handle the toll. Since it seems you are doing small found sets, that shouldn't be a problem, but always something to keep in mind.



            • 3. Re: Delete Found Set taking too long

              Calling your script server side will run it about 70 times faster on a modest server - big gains but not necessarily trivial in making it run smoothly.


              You may find it useful to remember that


              (1) every server side script call initiates a new user session - hence your startup script will run each time;

              (2) any sub scripts should be called locally - within the server side session;

              (3) the server log will record all the errors created by your process as you debug it;

              (4) creating your own event log to record what is happening within the server side session will help you greatly;

              (5) generally passing the criteria for finding the correct set of records, the layout on which the operation is to be performed and data giving this user the correct access rights to perform the operation are the minimum required for success.


              Cheers, Nick

              • 4. Re: Delete Found Set taking too long

                (yes i should not use the WAN - should rather drive down there and use a HEX editor on the hard drive)

                • 5. Re: Delete Found Set taking too long

                  thanx i am totally aware and a big fan and user of this killer feature. sorry i didnt make my situation more clear:


                  my question was if i should discconnect via admin console. I actually did this. So it didn't stop the progress bar of the deletion to disappear and the file still showed up.

                  I didnt even get the disconnect prompt. so i had to force quit filemaker pro adv 13.v3  which actually showed it was still running with 100% thread while it did the "delete all records of current found set" (of 2 records).


                  BTW - there was no cascading delete.


                  After restarting the server showed that the delete had been taken place - the records were gone. all seams normal.


                  Thanx for all your comments.


                  • 6. Re: Delete Found Set taking too long
                    Stephen Huston

                    My main point was that if you clear the container field before deleting the record, this may improve performance as the record will contain far less data to delete from the server during the actual deletion process.