Question-39: You have table in Cassandra as below
hadoopexam.price_by_year_and_name
(
purchase_year int,
course_name text,
price int,
username text
)
Where purchase_year, course_name are partition key and price is used to create secondary index. Which of the following statement is applicable here?
- Select all records having price > 1000, causes single partition read.
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Ans: C, D
Exp: If we want to use non primary key column as part of where clause, we should use the secondary indexes. However, this is not an ideal solution. Rather you should create a materialized view or additional table that is ordered by price column.
You can access to full explanation to question and answer from this page.