SHOW-VARIABLES

Name

SHOW VARIABLES

Description

This statement is used to display Doris system variables, which can be queried by conditions

grammar:

1. SHOW [GLOBAL | SESSION] VARIABLES
2. [LIKE 'pattern' | WHERE expr]

illustrate:

  • show variables is mainly used to view the values of system variables.
  • Executing the SHOW VARIABLES command does not require any privileges, it only requires being able to connect to the server.
  • Use the like statement to match with variable_name.
  • The % percent wildcard can be used anywhere in the matching pattern

Example

  1. The default here is to match the Variable_name, here is the exact match

1. show variables like 'max_connections'; 2. Matching through the percent sign (%) wildcard can match multiple items

1. show variables like '%connec%'; 3. Use the Where clause for matching queries

1. show variables where variable_name = 'version';

Keywords

1. SHOW, VARIABLES

Best Practice