SHOW keyword
This keyword provides table, column, and partition information including
metadata. The SHOW
keyword is useful for checking the
designated timestamp setting column, the
partition attachment settings,
and partition storage size on disk.
#
Syntax#
DescriptionSHOW
returns all the tables.SHOW COLUMNS
returns all the columns and their metadata for the selected table.SHOW PARTITIONS
returns the partition information for the selected table.SHOW PARAMETERS
shows configuration keys and their matchingenv_var_name
, their values and the source of the valueSHOW SERVER_VERSION
displays PostgreSQL compatibility versionSHOW USER
shows user secret (enterprise-only)SHOW USERS
shows all users (enterprise-only)SHOW GROUPS
shows all groups the user belongs or all groups in the system (enterprise-only)SHOW SERVICE ACCOUNTS
displays all service accounts or those assigned to the user/group (enterprise-only)SHOW SERVICE ACCOUNT
displays details of a service account (enterprise-only)SHOW PERMISSIONS
displays permissions of user, group or service account (enterprise-only)SHOW SERVER_CONF
shows the content of QuestDB's server.conf configuration file. (enterprise-only)
#
Examples#
SHOW TABLEStable |
---|
weather |
my_table |
... |
#
SHOW COLUMNScolumn | type | indexed | indexBlockCapacity | symbolCached | symbolCapacity | designated |
---|---|---|---|---|---|---|
symb | SYMBOL | true | 1048576 | false | 256 | false |
price | DOUBLE | false | 0 | false | 0 | false |
ts | TIMESTAMP | false | 0 | false | 0 | true |
s | STRING | false | 0 | false | 0 | false |
#
SHOW PARTITIONSindex | partitionBy | name | minTimestamp | maxTimestamp | numRows | diskSize | diskSizeHuman | readOnly | active | attached | detached | attachable |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | WEEK | 2022-W52 | 2023-01-01 00:36:00.0 | 2023-01-01 23:24:00.0 | 39 | 98304 | 96.0 KiB | false | false | true | false | false |
1 | WEEK | 2023-W01 | 2023-01-02 00:00:00.0 | 2023-01-08 23:24:00.0 | 280 | 98304 | 96.0 KiB | false | false | true | false | false |
2 | WEEK | 2023-W02 | 2023-01-09 00:00:00.0 | 2023-01-15 23:24:00.0 | 280 | 98304 | 96.0 KiB | false | false | true | false | false |
3 | WEEK | 2023-W03 | 2023-01-16 00:00:00.0 | 2023-01-18 12:00:00.0 | 101 | 83902464 | 80.0 MiB | false | true | true | false | false |
#
SHOW PARAMETERSThe output demonstrates:
property_path
: the configuration keyenv_var_name
: the matching env var for the keyvalue
: the current value of the keyvalue_source
: how the value is set (default, conf or env)
property_path | env_var_name | value | value_source |
---|---|---|---|
http.min.net.connection.rcvbuf | QDB_HTTP_MIN_NET_CONNECTION_RCVBUF | 1024 | default |
http.health.check.authentication.required | QDB_HTTP_HEALTH_CHECK_AUTHENTICATION_REQUIRED | true | default |
pg.select.cache.enabled | QDB_PG_SELECT_CACHE_ENABLED | true | conf |
cairo.sql.sort.key.max.pages | QDB_CAIRO_SQL_SORT_KEY_MAX_PAGES | 2147483647 | env |
You can optionally chain SHOW PARAMETERS
with other clauses:
#
SHOW USERor
auth_type | enabled |
---|---|
Password | false |
JWK Token | false |
REST Token | false |
#
SHOW USERSname |
---|
admin |
john |
#
SHOW GROUPSor
name |
---|
management |
#
SHOW SERVICE ACCOUNTor
auth_type | enabled |
---|---|
Password | false |
JWK Token | false |
REST Token | false |
#
SHOW SERVICE ACCOUNTS| name |
|-------------|
| management |
| svc1_admin |
| name |
|-------------|
| svc1_admin |
| name |
|-------------|
| svc1_admin |
#
SHOW PERMISSIONS FOR CURRENT USERpermission | table_name | column_name | grant_option | origin |
---|---|---|---|---|
SELECT | t | G |
#
SHOW PERMISSIONS userpermission | table_name | column_name | grant_option | origin |
---|---|---|---|---|
SELECT | t | G | ||
INSERT | orders | f | G | |
UPDATE | order_itme | quantity | f | G |
#
SHOW PERMISSIONS#
For a grouppermission | table_name | column_name | grant_option | origin |
---|---|---|---|---|
INSERT | orders | f | G |
#
For a service account| permission | table_name | column_name | grant_option | origin |
|------------|------------|-------------|--------------|--------|
| SELECT | | | t | G |
| INSERT | | | f | G |
| UPDATE | | | f | G |
#
SHOW SERVER_VERSIONShows PostgreSQL compatibility version.
server_version |
---|
12.3 (questdb) |
#
SHOW SERVER_CONFname | value |
---|---|
config.validation.strict | true |
query.timeout.sec | 60 |
#
See alsoThe following functions allow querying tables with filters and using the results as part of a function: