Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuration Parameter Hints

Updated on 2024-12-18 GMT+08:00

Function

A hint, or a GUC hint, specifies a configuration parameter value when a plan is generated.

Precautions

  • If a parameter set by hint takes effect at the statement level, the hint must be written to the top-level query instead of the subquery. For UNION, INTERSECT, EXCEPT, and MINUS statements, you can write the GUC hint at the statement level to any SELECT clause that participates in the set operation. The configuration parameters set by the GUC hint take effect on each SELECT clause that participates in the set operation.
  • When a subquery is pulled up, all GUC hints on the subquery are discarded.
  • If a parameter is set by both the statement-level GUC hint and the subquery-level GUC hint, the subquery-level GUC hint takes effect in the corresponding subquery, and the statement-level GUC hint takes effect in other subqueries of the statement.

Syntax

set [global]([@block_name] guc_name guc_value)

Parameters

  • global indicates that the parameter set by hint takes effect at the statement level. If global is not specified, the parameter takes effect only in the subquery where the hint is located.
  • block_name indicates the block name of the statement block. For details, see block_name.
  • guc_name indicates the name of the configuration parameter specified by hint.
  • guc_value indicates the value of a configuration parameter specified by hint.

Currently, GUC hints support only some configuration parameters. Some parameters cannot be configured at the subquery level and can only be configured at the statement level. The following table lists the supported parameters.

Table 1 Configuration parameters supported by GUC hints

Parameter

Configured at the Subquery Level (Yes/No)

agg_max_mem

Yes

agg_redistribute_enhancement

Yes

best_agg_plan

Yes

cost_model_version

No

cost_param

No

enable_array_optimization

No

enable_bitmapscan

Yes

enable_broadcast

Yes

enable_csqual_pushdown

No

enable_redistribute

Yes

enable_extrapolation_stats

Yes

enable_fast_query_shipping

No

enable_force_vector_engine

No

enable_hashagg

Yes

enable_hashfilter

No

enable_hashjoin

Yes

enable_index_nestloop

Yes

enable_indexonlyscan

Yes

enable_indexscan

Yes

enable_join_pseudoconst

Yes

enable_mergejoin

Yes

enable_mixedagg

No

enable_nestloop

Yes

enable_nodegroup_debug

No

enable_partition_dynamic_pruning

Yes

enable_seqscan

Yes

enable_sonic_hashagg

No

enable_sonic_hashjoin

Yes

enable_sort

Yes

enable_stream_ctescan

No

enable_tidscan

Yes

enable_value_redistribute

Yes

enable_vector_engine

No

expected_computing_nodegroup

No

force_bitmapand

Yes

from_collapse_limit

Yes

join_collapse_limit

Yes

join_num_distinct

Yes

outer_join_max_rows_multipler

Yes

prefer_hashjoin_path

No

qrw_inlist2join_optmode

Yes

qual_num_distinct

Yes

query_dop

No

query_max_mem

No

query_mem

No

rewrite_rule

No

setop_optmode

Yes

skew_option

Yes

stream_ctescan_max_estimate_mem

No

stream_ctescan_pred_threshold

No

stream_ctescan_refcount_threshold

No

windowagg_pushdown_enhancement

No

index_selectivity_cost

Yes

index_cost_limit

Yes

Examples

Hint the query plan in Examples as follows:

explain
select /*+ set global(query_dop 0) */ i_product_name product_name
...

This hint indicates that the query_dop parameter is set to 0 when the plan for a statement is generated, which means the SMP adaptation function is enabled. The generated plan is as follows:

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback