Outdated Version

You are viewing an older version of this section. View current production version.

TRIGGER GC

Triggers the garbage collector on the source aggregator and propagates to all the leaves.

Syntax

TRIGGER [n] GC [FLUSH]

Arguments

  • FLUSH: Releases all unused memory back to the operating system.
  • n: Specifies the number of passes of the GC to run. By default, MemSQL runs 3 passes of the GC.

Remarks

  • This command can be run on any aggregator.
  • Only users with SUPER privileges can run this command.
  • The garbage collector runs automatically. You may still need to manually trigger the GC in the following scenarios:
    • If you need to free up the cached memory using the FLUSH option. (MemSQL only caches memory when it is available and not under any duress. Hence, this practice may turn out to be counter-productive.)
    • If one of the partitions is using more memory (while bulk-loading/deleting data or recovering from a restart) and you are forced to wait until the garbage collection completes.

Examples

TRIGGER GC FLUSH;