[ 
https://issues.apache.org/jira/browse/CASSANDRA-20161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907624#comment-17907624
 ] 

Chris Lohfink edited comment on CASSANDRA-20161 at 12/21/24 4:33 PM:
---------------------------------------------------------------------

Will only scan the areas of the query so good for paging and even though its 
2nd part of the clustering key it will jump to the key if dont know tokens


{code:sql}
SELECT * FROM system_views.primary_ids WHERE keyspace_name = 'easy_cass_stress' 
AND table_name = 'keyvalue' AND key = '001.0.843388';

 keyspace_name    | table_name | token_value          | key          | 
size_estimate | sstables
------------------+------------+----------------------+--------------+---------------+----------
 easy_cass_stress |   keyvalue | -9220198620824067469 | 001.0.843388 |          
 125 |        1

(1 rows) {code}


was (Author: clohfink):
Will only scan the areas of the query so good for paging and even though its 
2nd part of the clustering key it will jump to the key if dont know tokens


{code:sql}
SELECT * FROM system_views.primary_ids WHERE keyspace_name = 'easy_cass_stress' 
AND table_name = 'keyvalue' AND key='001.0.843388';

 keyspace_name    | table_name | token_value          | key          | 
size_estimate | sstables
------------------+------------+----------------------+--------------+---------------+----------
 easy_cass_stress |   keyvalue | -9220198620824067469 | 001.0.843388 |          
 125 |        1

(1 rows) {code}

> Virtual table to query partition keys in a table
> ------------------------------------------------
>
>                 Key: CASSANDRA-20161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20161
>             Project: Apache Cassandra
>          Issue Type: New Feature
>          Components: Feature/Virtual Tables
>            Reporter: Chris Lohfink
>            Assignee: Chris Lohfink
>            Priority: Normal
>
> Introduce a new virtual table, {{{}PrimaryIdTable{}}}, to allow users to 
> query partition keys and related metadata for a specific table within a 
> keyspace. This feature provides insights into SSTable-level details, such as 
> token values, size estimates, and SSTable counts, without requiring expensive 
> disk-based operations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to