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?

 

  1. Select all records having price > 1000, causes single partition read.
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. 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.