A scheduler task is available to help maintain your Graph_tmp table. It removes any row growth from the Graph_tmp table, and stores the diagnostics in temporary tables if required. This task runs daily as part of the main scheduler. For more information on the schedulers, see Configuring schedulers.
To store the removed information in a temporary table, in the SPFAppServer.config file, set EnableGraphTmpMaintenanceLog to True. By default, this is set to False. The SPFAppServer.config file is located in <installation_directory>\SPFConfigService\SPFSharedSettings.
In the SPFAppServer.config file, if UseGeneratedTempTableAlways is set to True, then mem_tmp table is being used instead of the Graph_tmp table and so no optimizations of Graph_tmp will be carried out.