==db:optimize==
{{Mark|Updated with Version 7.9}}: Allow [[Options#UPDINDEX|UPDINDEX]] if {{Code|$all}} is {{Code|true}}.
{| width='100%'
|-
| '''Summary'''
|Optimizes the meta data and indexes of the database {{Code|$db}}.<br/>If {{Code|$all}} is set to {{Code|true()}}, the complete database will be rebuilt.<br/>The usage of the {{Code|$options}} argument is identical to the [[#db:create|db:create]] function, except that the no parsing options can be specified, and [[Options#UPDINDEX|UPDINDEX]] option is not supportedonly allowed if {{Code|$all}} is {{Code|true}}.
|-
| '''Errors'''