Overview
sql_select_limit specifies the maximum number of rows that a SELECT query is allowed to return. If a SELECT statement includes a LIMIT clause, the value in the LIMIT clause takes precedence over sql_select_limit. By default, the number of rows returned by a SELECT statement is not limited.
Privilege requirements
Query variables
Global level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Session level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 9223372036854775807 |
| Value range | [0, 9223372036854775807] |
| Effective Scope |
|
| Modifiable | Yes, you can use the following methods:SETStatement modification. |
Configuration example
Specify that a SELECT query is allowed to return at most 100 rows.
Session expiration
obclient> SET sql_select_limit= 100;Effective globally
obclient> SET GLOBAL sql_select_limit= 100;