# OPTIMIZEVAULTFLAGS

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OPTIMIZEVAULTFLAGS/

Optimize vault flags.

- **Full name:** `MFiles.OPTIMIZEVAULTFLAGS`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-all"></a>`all` | `bool` | 1 | Specifies all flags set; Including any future flags. |
| <a id="f-is_thorough"></a>`is_thorough` | `bool` | 2 | Thorough or quick optimization? In quick mode, only the indexes of the metadata database are refreshed. Thorough optimization performs a garbage-collection in the database and rebuilds indexes. The quick mode optimization is an online activity whereas the thorough mode optimization takes the vault offline. |
| <a id="f-garbage_collect_files"></a>`garbage_collect_files` | `bool` | 3 | Directs the optimization job to destroy garbage-collected data files that stand for destroyed objects. |

<a id="used-in-fields"></a>

## Used in fields

- [`OptimizeVaultJob.flags`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.OptimizeVaultJob/index.md#f-flags): Flags that control the execution of this job.
