Search code examples
jbase

How do I use triggers in jBase?


I am doing some research and I would like to know if using triggers is hard on system resources? Has anyone noticed an issue with slowdown or memory usage with files that have a trigger?

Thank-you


Solution

  • This could depend on what you are doing in the trigger.

    Normally, when creating a trigger in jBase you would attach a subroutine to that trigger and the subroutine would write one or several other records in some other tables. It should not do any selects or other "lengthy" procedures. If your subroutine is simple and quick there are no issues with the slowdown of the system and memory usage does not increase.

    I have used triggers on up to 300 large tables with heavy amounts of writes and reads without any issues in a production environment.