How to switch SQL Execution Engine from Vectorized Execution Engine (VEE) to Scalar Execution Engine (SEE) ?

{question}With the introduction of NuoDB v4.2, the default execution engine is our Vectorized Execution Engine (VEE).  There may be rare situations where customers may want to switch back to the legacy engine which is the Scalar Execution Engine (SEE). {question}

{answer}

The first thing that you should always do is check which NuoDB version you are actually using and confirm that you are using the correct version.  To do this,  execute the following command to ensure that your NuoDB version doesn't include VEE tag ( eg. 4.2.1.vee-3-c42866be32) as NuoDB version without this tag supports scalar engine while NuoDB Version with VEE tag doesn't have scalar engine compiled in. 

nuocmd show domain 

To enable the scalar execution engine, we recommend the following actions:

When Upgrading from a Previous Release

Set the database’s default execution engine option so all transaction engines that start after the change will connect using the scalar execution engine by default (unless overridden by using the connection property SQLEngine=vee setting).

nuocmd update database-options --db-name <database name> --default-options execution-engine scalar
  • Please note that this will only take effect for TEs that you start AFTER running this command.  It doesn't impact engines that were previously started. 
  • For more information: NuoDB Database Options

Alternatively, you may choose this approach when applications use both vectorized and scalar engines:  

  • Per-connection basis.  When you have a client application connecting to NuoDB, you can add the following connection property as part of the connection URL (SQLEngine= [ scalar | vee ]).
    For example:
jdbc:com.nuodb://TE-host:port/testdb?schema=MyData&SQLEngine=scalar

When Creating a New Database

  • Use nuocmd create database with the --default-options argument to set the database default at database creation time.  No other configurations or setup are required to use SEE in the future.
  • For example:
nuocmd create database --db-name <database name> --dba-user <username> --dba-password <password> --te-server-ids <server ID> --default-options execution-engine scalar

When Modifying an Already Running Database

  • Set the database’s default execution engine option and transaction engines that start after the change will connect using the scalar execution engine by default unless overridden by using the connection property SQLEngine=vee setting.
nuocmd update database-options --db-name <database name> --default-options execution-engine scalar
  • Note that this will only take effect for transaction engines you start AFTER running this command and It doesn't impact engines that were already started.
  • For more information: NuoDB Database Options

Verifying the Change

To verify that your change applied successfully, you can find the execution engine used by the database by running this command:

nuocmd show database --db-name <database name>

or

nuocmd get processes

Notes:

  1. VEE is the default engine in NuoDB v4.2 so if you plan to upgrade to NuoDB v4.2, please check Upgrading to New Release Documentation.
  2. Initial connection startup processing is optimized when the TE execution engine value and the SQL engine connection property values match.
  3. For more information about VEE: Vectorized Execution Engine (VEE) Documentation
    {answer}
Have more questions? Submit a request

Comments