Execution profiles

Execution profiles allows a single session to run different types of query workloads, each with its own settings.

Execution profiles allows a single session to run different types of query workloads, each with its own settings. An execution profile encapsulates a group of settings that can then be associated with individual queries. This provides a convenient way to group queries based on the following settings:

  • Request timeout
  • Consistency level
  • Load balancing policy
  • Retry policy
  • Speculative execution policy
Note: This is not an exhaustive list and can vary by driver implementation.
Table 1. Execution policies for drivers
C/C++ C# Java Node.js PHP (not supported) Python Ruby

Using execution profiles

Create, configure, and register an execution profile object by name using the cluster or session objects, depending on the driver. Associate the named execution profile object with a query by providing the name to the query execution method or setting it on a statement object.

The method of associating the profile name with the query execution can vary by driver implementation. See the language-specific documentation for additional details on using execution profiles.