2 Replies Latest reply on Aug 19, 2013 7:08 AM by KenanKadić

    Database Optimization

    KenanKadić

      Title

      Database Optimization

      Post

           Hello community!

            

           I got to thinking about some database optimization issues. Say I have a table that holds records about users and their clock-in and clock-out timestamps. This table will grow by at least couple of hundreds of new records every day.

            

           On the other side, I have a layout that shows me the number of users currently clocked-in and also, gives me a list of those users. In order to achieve this, a global field with the calculation result of number 1 has been added to the "Users" table. In a Timestamp table, there is also a field wich remains empty when user is clocked-out and has a value of 1 when user is clocked in. With this setup, Filemaker can now compare the two fields and return the list of active users.

            

           As the "Timestamps" table grows in size, I am expecting to notice bigger and bigger drops in performance. I say this because I assume that the COMPLETE Timestamps table will have to be examined EACH time i request this statistical information.

            

           Having that in mind, is there a way to tell Filemaker to take into concideration only the records that have been created within the past 24 or 48 hours?

            

           Many thanks!