ablog

不器用で落着きのない技術者のメモ

Redshift でセッションレベルで変更可能なパラメータ

SET
サーバー設定パラメータの値を設定します。SET コマンドを使用して、現在のセッションまたはトランザクションのみの期間の設定をオーバーライドします。

SET - Amazon Redshift
  • SET コマンドを使用して、現在のセッションの期間だけ設定をオーバーライドします。次に例を示します。
set extra_float_digits to 2;
  • クラスターのパラメータグループ設定を変更します。パラメータグループ設定には、設定可能な追加のパラメータが含まれています。詳細については、Amazon Redshift クラスター管理ガイドの Amazon Redshift パラメータグループを参照してください。
  • ALTER USER コマンドを使用して、指定したユーザーによって実行されるすべてのセッションに対して、設定パラメータを新しいデフォルト値に設定します。
ALTER USER username SET parameter { TO | = } { value | DEFAULT }
  • 現在のパラメータ設定を見るには、SHOW コマンドを使用します。SET コマンドを使用して設定できるすべての設定値を表示するには、SHOW ALL を使用します。
show all;
name                      | setting      
--------------------------+--------------
analyze_threshold_percent | 10           
datestyle                 | ISO, MDY     
extra_float_digits        | 2            
query_group               | default      
search_path               | $user, public
statement_timeout         | 0            
timezone                  | UTC            
wlm_query_slot_count      | 1        
設定リファレンス - Amazon Redshift
Parameter name Value More information
auto_analyze true auto_analyze in the Amazon Redshift Database Developer Guide
datestyle ISO, MDY datestyle in the Amazon Redshift Database Developer Guide
enable_case_sensitive_identifier false enable_case_sensitive_identifier in the Amazon Redshift Database Developer Guide
enable_user_activity_logging false Database audit logging in this guide
extra_float_digits 0 extra_float_digits in the Amazon Redshift Database Developer Guide
max_concurrency_scaling_clusters 1 max_concurrency_scaling_clusters in the Amazon Redshift Database Developer Guide
query_group default query_group in the Amazon Redshift Database Developer Guide
require_ssl false Configuring security options for connections in this guide
search_path $user, public search_path in the Amazon Redshift Database Developer Guide
statement_timeout 0 statement_timeout in the Amazon Redshift Database Developer Guide
wlm_json_configuration [{"auto_wlm":true}] Configuring workload management in this guide
use_fips_ssl false Enable FIPS-compliant SSL mode only if your system is required to be FIPS-compliant.
auto_mv true Automated materialized views in the Amazon Redshift Database Developer Guide

...

You can temporarily override a parameter by using the SET command in the database. The SET command overrides the parameter for the duration of your current session only. In addition to the parameters listed in the preceding table, you can also temporarily adjust the slot count by setting wlm_query_slot_count in the database. The wlm_query_slot_count parameter is not available for configuration in parameter groups. For more information about adjusting the slot count, see wlm_query_slot_count in the Amazon Redshift Database Developer Guide. For more information about temporarily overriding the other parameters, see Modifying the server configuration in the Amazon Redshift Database Developer Guide.

Amazon Redshift parameter groups - Amazon Redshift