ALTER MAPPING

You reroute queries to a query pool using this command.

Syntax

ALTER { USER | GROUP | APPLICATION } MAPPING 'entity_name' IN plan_name { TO pool_path | UNMANAGED } [ WITH ORDER num ]
  • entity_name
    • The name of the user specified in the connection string
    • The name of the group of users specified in the connection string
    • The name of the application specified in the connection string or through the SetClientInfo JDBC API with the ApplicationName key
  • plan_name

    The name of a resource plan

  • pool_path

    The name of a query pool, which can be a hierarchy of pools in dot notation

  • num

    An integer that establishes the priorities for the routing rules. The order of precedence is lower to higher. If you set multiple rules (a user and a group rule, or rules for multiple groups) the lowest ordered rule takes precedence. If ordering is not specified or is the same for routing rules, user rules take precedence over application rules, which take precedence over group rules. The order of group rules with the same priority is undefined.

Example

ALTER GROUP MAPPING 'marketing' IN rp1 IN myplan TO pool1 WITH ORDER 1;

The marketing group in the rp1 pool of myplan is mapped to pool with top routing priority.