Updated on 2023-02-23 GMT+08:00

Queries

Using a Sort Key for Range Query

It is recommended that the sequence of the sort keys for range query be the same as that used during table creation. Otherwise, the performance deteriorates.

If no sort key sequence is specified, the default sort key sequence is ASC during query and table creation.

COUNT Query

If a database contains a very large amount of data, do not run the following statement to query the database. Otherwise, the query may fail.

select count(*) from "test" where sds_uid='100000000000000006250004';

The following statement is recommended:

select sum(row_count) From system_distributed.size_estimates WHERE keyspace_name='' and table_name='';

This query is an asynchronous task in the background, so the results are not accurate and for reference only.