This statement is used to display Doris system variables, which can be queried by conditions
SHOW [<effective_scope>] VARIABLES [<like_pattern> | <where clause>]
1. <effective_scope>
Effective scope is one of
GLOBALorSESSIONorLOCAL. If there is no effective scope, default value isSESSION.LOCALis an alias ofSESSION.
2. <like_pattern>
Use like statement to match and filter result
3. <where>
Use where statement to match and filter result
Users executing this SQL command must have at least the following privileges:
| Privilege | Object | Notes |
|---|---|---|
| Any_PRIV | Session | Any privilege can show variables |
| Variable_name | Value | Default_Value | Changed |
|---|---|---|---|
| variable name1 | value1 | default value1 | 0/1 |
| variable name2 | value2 | default value2 | 0/1 |
Changed from Return Value, 0 means no changed and 1 means changed.SHOW statement:or in where clauseThe default here is to match the Variable_name, here is the exact match
show variables like 'max_connections';
Matching through the percent sign (%) wildcard can match multiple items
show variables like '%connec%';
Use the Where clause for matching queries
show variables where variable_name = 'version';