The cost-based optimization is enabled by default, but it can be
disabled in the “Queries optimization” dialog of the menu
“Administration > Server configuration” (see section Queries Optimization).

To enable/disable this optimization for a specific database, click
Database management in the Administration menu, select the
database and click Edit. Then, select Automatic cost based
optimization on or off and click Ok. In this dialog, if
“Automatic cost based optimization” is Default, the database has the
configuration defined in the “Queries optimization” dialog.