Retrieve metadata details
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
This page describes Aerospike Quick Look (AQL) commands to list namespaces, sets, bins, indexes, and record details.
SHOW NAMESPACES
To list namespaces, enter the following command:
SHOW NAMESPACESshow namespaces+------------+| namespaces |+------------+| "test" || "bar" |+------------+2 rows in set (0.001 secs)SHOW SETS
To list sets, enter the following command:
SHOW SETSshow sets+---------+-----------+-----------+------------+-----------+---------+| ns_name | set_name | n_objects | stop-write | evict-hwm | delete |+---------+-----------+-----------+------------+-----------+---------+| "test" | "newtest" | 11 | 0 | 0 | "false" || "test" | "users" | 1 | 0 | 0 | "false" |+---------+-----------+-----------+------------+-----------+---------+2 rows in set (0.001 secs)SHOW BINS
To list bins, enter the following command:
SHOW BINSshow bins+-----------+-------+-------+-----------+| namespace | count | quota | bin |+-----------+-------+-------+-----------+| "test" | 5 | 65535 | "b" || "test" | 5 | 65535 | "c" || "test" | 5 | 65535 | "a" || "test" | 5 | 65535 | "l" || "test" | 5 | 65535 | "k" |+-----------+-------+-------+-----------+5 rows in set (0.000 secs)SHOW INDEXES
To list indexes, enter the following command:
SHOW INDEXESshow indexes+----------+---------+--------+----------------------+-----------+--------+------------+-------+---------------+| bin | context | exp | indexname | indextype | ns | set | state | type |+----------+---------+--------+----------------------+-----------+--------+------------+-------+---------------+| "age" | "null" | "null" | "profile_age_idx" | "default" | "test" | "profiles" | "RW" | "numeric" || "gender" | "null" | "null" | "profile_gender_idx" | "default" | "test" | "profiles" | "RW" | "string" || "city" | "null" | "null" | "profile_city_idx" | "default" | "test" | "profiles" | "RW" | "string" || "gj" | "null" | "null" | "demo_gj_idx" | "default" | "test" | "demo" | "RW" | "geo2dsphere" || "foo" | "null" | "null" | "demo_foo_idx" | "default" | "test" | "demo" | "RW" | "numeric" |+----------+---------+--------+----------------------+-----------+--------+------------+-------+---------------+[127.0.0.1:3100] 5 rows in set (0.005 secs)
OKEXPLAIN SELECT
To display details for a single record, enter the following command:
explain select * from <ns>.<set> where PK=<primary key value>explain select * from test.uqr where PK=1[{"SET": "uqr","DIGEST": "42 7A 64 AE 7B 80 EE 02 3D B8 E9 00 8A F3 FF B0 7F DA EB 58","NAMESPACE": "test","PARTITION": 2626,"STATUS": 2,"UDF": "FALSE","KEY_TYPE": "STRING","TIMEOUT": 1000,"NODE": "1771FE6C15290C00","POLICY": "AS_POLICY_REPLICA_MASTER","KEY_POLICY": "AS_POLICY_KEY_SEND"}]The command contains the following arguments:
SET: Name of the set for the record.DIGEST: Digest for the record.NAMESPACE: Namespace for the record.PARTITION: Partition where the record lives. The partition value is between 0 and 4095.STATUS: Status of the operation. It is the status code returned by the client for the record. For example, 0 isAEROSPIKE_OKand 2 isAEROSPIKE_ERR_RECORD_NOT_FOUND. See the list of generic error codes in C - Error Codes.KEY_TYPE: Type of the key (string/numeric etc) that was sent to the server.TIMEOUT: Timeout value for the AQL command.NODE: ID of the node where the master record currently lives. The node ID might change during migrations.POLICY: Replica read policy that the client can set when reading the record. Two possible values are:AS_POLICY_REPLICA_MASTER(which is by default) to set the reads to go only to its master copy and,AS_POLICY_REPLICA_ANYto read in a round-robin operation on all its replica copies. Set the policy toAS_POLICY_REPLICA_ANYby executingset replica_any truein AQL.
KEY_POLICY: Indicates whether the client sent the key and digest to the server or just the digest. Two possible values are:AS_POLICY_KEY_SEND: If the key was sent along with the digest; andAS_POLICY_KEY_DIGEST: If only the digest was sent.