SHOW
Use SHOW
commands to get information about databases, tables, and user sessions.
SHOW CREATE SERVER
Shows the CREATE SERVER statement that could have been used to create the server.
Syntax
Example
SHOW CREATE TABLE
Shows the CREATE TABLE statement that could have been used to create the table.
Syntax
Example
SHOW DATABASES
Retrieve the databases accessible for the current user, showing the database name and owner.
Example
SHOW FUNCTIONS
Show registered compile-time UDFs and extension functions in the system and their arguments.
Syntax
Example
SHOW POLICIES
Displays a list of all row-level security (RLS) policies that exist for a user or role; admin rights are required. If EFFECTIVE is used, the list also includes any policies that exist for all roles that apply to the requested user or role.
Syntax
SHOW QUERIES
Returns a list of queued queries in the system; information includes session ID, status, query string, account login name, client address, database name, and device type (CPU or GPU).
Example
Admin users can see and interrupt all queries, and non-admin users can see and interrupt only their own queries
NOTE: SHOW QUERIES is only available if the runtime query interrupt parameter (enable-runtime-query-interrupt
) is set.
To interrupt a query in the queue, see KILL QUERY.
SHOW ROLES
If included with a name, lists the role granted directly to a user or role. SHOW EFFECTIVE ROLES with a name lists the roles directly granted to a user or role, and also lists the roles indirectly inherited through the directly granted roles.
Syntax
If the user name or role name is omitted, then a regular user sees their own roles, and a superuser sees a list of all roles existing in the system.
SHOW RUNTIME FUNCTIONS
Show user-defined runtime functions and table functions.
Syntax
SHOW SUPPORTED DATA SOURCES
Show data connectors.
Syntax
SHOW TABLE DETAILS
Displays storage-related information for a table, such as the table ID/name, number of data/metadata files used by the table, total size of data/metadata files, and table epoch values.
You can see table details for all tables that you have access to in the current database, or for only those tables you specify.
Syntax
Examples
Show details for all tables you have access to:
Show details for table omnisci_states
:
The number of columns returned includes system columns. As a result, the number of columns in column_count
can be up to two greater than the number of columns created by the user.
SHOW TABLE FUNCTIONS
Displays the list of available system (built-in) table functions.
For more information, see System Table Functions.
SHOW TABLE FUNCTIONS DETAILS
Show detailed output information for the specified table function. Output details vary depending on the table function specified.
Syntax
Example - generate_series
View SHOW output for the generate_series
table function:
name
generate_series
signature
(i64 series_start, i64 series_stop, i64 series_step)
(i64 series_start, i64 series_stop) -> Column
input_names
series_start, series_stop, series_step
series_start, series_stop
input_types
i64
output_names
generate_series
output_types
Column i64
CPU
true
GPU
true
runtime
false
filter_table_transpose
false
SHOW SERVERS
Retrieve the servers accessible for the current user.
Example
SHOW TABLES
Retrieve the tables accessible for the current user.
Example
SHOW USER DETAILS
Lists name, ID, and default database for all or specified users for the current database. If the command is issued by a superuser, login permission status is also shown. Only superusers see users who do not have permission to log in.
Example
SHOW [ALL] USER DETAILS lists name, ID, superuser status, default database, and login permission status for all users across the HeavyDB instance. This variant of the command is available only to superusers. Regular users who run the SHOW ALL USER DETAILS command receive an error message.
Superuser Output
Show all user details for all users:
Show all user details for specified users ue, ud, ua, and uf:
If a specified user is not found, the superuser sees an error message:
Show user details for specified users ue, ud, and uf:
Show user details for all users:
Non-Superuser Output
Running SHOW ALL USER DETAILS results in an error message:
Show user details for all users:
If a specified user is not found, the user sees an error message:
Show user details for user ua:
SHOW USER SESSIONS
Retrieve all persisted user sessions, showing the session ID, user login name, client address, and database name. Admin or superuser privileges required.
KILL QUERY
Interrupt a queued query. Specify the query by using its session ID.
To see the queries in the queue, use the SHOW QUERIES command:
To interrupt the last query in the list (ID 946-ooNP
):
Showing the queries again indicates that 946-ooNP
has been deleted:
KILL QUERY is only available if the runtime query interrupt parameter (
enable-runtime-query-interrupt
) is set.Interrupting a query in ‘PENDING_QUEUE’ status is supported in both distributed and single-server mode.
To enable query interrupt for tables imported from data files in local storage, set
enable_non_kernel_time_query_interrupt
to TRUE. (It is enabled by default.)
Last updated