Logo
Federated Queries

Federated Queries #

SyntaxDescriptionType
ALTER SQL_FEDERATION RULE( SQL_FEDERATION_ENABLED=true/false, EXECUTION_PLAN_CACHE(INITIAL_CAPACITY=2000, MAXIMUM_SIZE=65535), MAX_USAGE_MEMORY_PER_QUERY=‘50M’, SPILL_ENABLED=true/false, SPILL_PATH=“path”, SPILL_COMPRESSION_ENABLED=true/false );RAL
SHOW SQL_FEDERATION RULEQuery federated query rule configurationRQL

1. Update Federated Query Rule Configuration #

 ALTER SQL_FEDERATION RULE(  SQL_FEDERATION_ENABLED=true/false,  EXECUTION_PLAN_CACHE(INITIAL_CAPACITY=xxx, MAXIMUM_SIZE=xxxx)MAX_USAGE_MEMORY_PER_QUERY='xxx', SPILL_ENABLED=false, SPILL_PATH="xxx", SPILL_COMPRESSION_ENABLED=false);

Parameter Explanation

SQL_FEDERATION_ENABLED: Federated query switch EXECUTION_PLAN_CACHE: Execution plan cache INITIAL_CAPACITY: Initial cache size MAXIMUM_SIZE: Maximum cache size MAX_USAGE_MEMORY_PER_QUERY: Maximum available memory per query SPILL_ENABLED: Whether spilling is allowed SPILL_PATH: Spill path SPILL_COMPRESSION_ENABLED: Spill encryption

Example

 ALTER SQL_FEDERATION RULE(
 SQL_FEDERATION_ENABLED=false,
 EXECUTION_PLAN_CACHE(INITIAL_CAPACITY=2000, MAXIMUM_SIZE=65535),
 MAX_USAGE_MEMORY_PER_QUERY='50M',
 SPILL_ENABLED=false,
 SPILL_PATH="path",
 SPILL_COMPRESSION_ENABLED=false
 );
  1. Query Federated Query Rule Configuration
 SHOW SQL_PARSER RULE

Parameter Explanation

None

Example

SHOW SQL_PARSER RULE;
+------------------------+-------------------------------------------+----------------------------+---------------+------------+---------------------------+
| sql_federation_enabled | execution_plan_cache                      | max_usage_memory_per_query | spill_enabled | spill_path | spill_compression_enabled |
+------------------------+-------------------------------------------+----------------------------+---------------+------------+---------------------------+
| false                  | initialCapacity: 2000, maximumSize: 65535 | 50M                        | false         | path       | false                     |
+------------------------+-------------------------------------------+----------------------------+---------------+------------+---------------------------+