set_goal

This is used by query clients to set the goal for subsequent queries and can be used as an alternative to the USE GOAL clause where query clients do not support the use of that clause.

The possible goals are:

  • Response - gives the fastest possible query response time
  • Available - provides the highest availability
  • Balance - balances query workload across instance servers
  • Recent - picks the instance node under each edge with the most recent data
  • Complete - picks the instance node under each edge with the most complete data

Available in a network database to all users.

Parameters:

Name Optional Type Description
goal$ Mandatory Text The goal to be set for queries
table$ Optional Text Optional name of the table to apply the goal to

Examples:

SELECT set_goal('response',null); -- sets the goal as fastest response.

SELECT set_goal('available',null); -- sets the goal as greatest availability.

SELECT set_goal('balance',null); -- sets the goal as balanced query workload.

SELECT set_goal('recent','mytable'); -- sets the goal as the most recent rows in table 'mytable'.

SELECT set_goal('complete','mytable'); -- sets the goal as the most complete rows in table 'mytable'.

Tips:

  • Use a null value to omit an optional parameter
  • The goal must be one of 'response', 'available', 'balance', 'recent' or 'complete'
  • The 'recent' and 'complete' goals must specify a table to apply the goal to.
  • If a goal is not set for a query then 'response' is assumed by default. 
Have more questions? Submit a request

Comments

Article is closed for comments.

Powered by Zendesk