YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Enable Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Stream Processing
DR (Disaster Recovery)
Configuration Parameters
Index
Extension
SQL Reference
FAQ
Change the limits for resource queues.
ALTER RESOURCE QUEUE name WITH ( queue_attribute=value [, ... ] )
where queue_attribute is:
ACTIVE_STATEMENTS=integer
MEMORY_LIMIT='memory_units'
MAX_COST=float
COST_OVERCOMMIT={TRUE|FALSE}
MIN_COST=float
PRIORITY={MIN|LOW|MEDIUM|HIGH|MAX}
ALTER RESOURCE QUEUE name WITHOUT ( queue_attribute [, ... ] )
where queue_attribute is:
ACTIVE_STATEMENTS
MEMORY_LIMIT
MAX_COST
COST_OVERCOMMIT
MIN_COST
Note: A resource queue must have one of the values of ACTIVE_STATEMENTS or MAX_COST. Both cannot be deleted from queue_attributes in the resource queue.
A resource queue must have an ACTIVE_STATEMENTS or MAX_COST value (or both). Users can set or reset the priority of a resource queue to control the CPU available resources used by queries related to the resource queue, or set the memory limit of the resource queue to control the total amount of memory that all submitted queries in the resource queue can use on a Segment host.
ALTER RESOURCE QUEUE WITHOUT Removes the restrictions specified on the resource before. A resource queue must have one of the values ACTIVE_STATEMENTS or MAX_COST. Both cannot be deleted from the queue_attributes of the resource queue.
name
ACTIVE_STATEMENTS integer
MEMORY_LIMIT 'memory_units'
MAX_COST float
COST_OVERCOMMIT boolean
MIN_COST float
PRIORITY={MIN|LOW|MEDIUM|HIGH|MAX}
Change the active query limit for resource queues:
ALTER RESOURCE QUEUE myqueue WITH (ACTIVE_STATEMENTS=20);
Change the memory limit of the resource queue:
ALTER RESOURCE QUEUE myqueue WITH (MEMORY_LIMIT='2GB');
Reset the maximum and minimum query cost limits for resource queues to unlimited:
ALTER RESOURCE QUEUE myqueue WITH (MAX_COST=-1.0,
MIN_COST= -1.0);
Reset the query cost limit for resource queues to 3^10 (or 300000000.0) Do not allow excessive use:
ALTER RESOURCE QUEUE myqueue WITH (MAX_COST=3e+10,
COST_OVERCOMMIT=FALSE);
Reset the priority of the query associated with the resource queue to the minimum level:
ALTER RESOURCE QUEUE myqueue WITH (PRIORITY=MIN);
Remove MAX_COST and MEMORY_LIMIT restrictions from resource queues:
ALTER RESOURCE QUEUE myqueue WITHOUT (MAX_COST, MEMORY_LIMIT);
The ALTER RESOURCE QUEUE statement is an extension of the YMatrix database, and this command does not exist in standard PostgreSQL.